• Resolved patrice06

    (@patrice06)


    Hello from France,

    I made a theme child for my WordPress blog, and it runs fine . . . except one thing:

    I need to make a change in inc/template-tags.php, so I did it and put the new template-tags.php in a new directory inc created in folder of my theme child.

    Unfortunately, the new file is not read.

    Can you help me, please?
    Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What specifically do you want to change?

    Thread Starter patrice06

    (@patrice06)

    Messages in english in template-tags.php (leave a comment and Edit)

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Add this to your Child Theme functions.php file and modify its content to what you want:

    
    
    	/**
    	 * Prints HTML with meta information for the categories, tags and comments.
    	 */
    	function education_hub_entry_footer() {
    		// Hide category and tag text for pages.
    		if ( 'post' === get_post_type() ) {
    			/* Translators: used between list items, there is a space after the comma. */
    			$categories_list = get_the_category_list( esc_html__( ', ', 'education-hub' ) );
    			if ( $categories_list && education_hub_categorized_blog() ) {
    				printf( '<span class="cat-links">%1$s</span>', $categories_list ); // WPCS: XSS OK.
    			}
    
    			/* Translators: used between list items, there is a space after the comma. */
    			$tags_list = get_the_tag_list( '', esc_html__( ', ', 'education-hub' ) );
    			if ( $tags_list ) {
    				printf( '<span class="tags-links">%1$s</span>', $tags_list ); // WPCS: XSS OK.
    			}
    		}
    
    		if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
    			echo '<span class="comments-link">';
    			comments_popup_link( esc_html__( 'Leave a comment', 'education-hub' ), esc_html__( '1 Comment', 'education-hub' ), esc_html__( '% Comments', 'education-hub' ) );
    			echo '</span>';
    		}
    
    		edit_post_link( esc_html__( 'Edit', 'education-hub' ), '<span class="edit-link">', '</span>' );
    	}
    
    Thread Starter patrice06

    (@patrice06)

    Absolutely PERFECT ! !
    Thank you so much for your help.

    Have a nice day.
    Patrice

    Thread Starter patrice06

    (@patrice06)

    Hi Andrew,
    sorry to bother you, another time, but I have another English term to translate from search.php.
    It’s about line 18 –> Search Results for: (I have to translate into: Resultats pour).
    I tried to copy the lines to my new functions.php in my child theme, but, always got errors php.
    Could you help me, please.
    Thank you so much.

    Thread Starter patrice06

    (@patrice06)

    OK, I solve my problem.
    Thirst, I bought pro version of education-hub. Inside, there is a file for translation, education-hub.pot.
    Then, with poedit, I translate what I need and poedit created 2 files .po and .mo.
    Then I copied these files in wp-content/languages/themes/.
    That’s all.
    Hope it helps

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Theme child’ is closed to new replies.