• Resolved Thobie

    (@thobie)


    Still, even after umpteen updates for the Sydney theme, the following error persists:

    The display above the post title reads:

    Date | Category | Author | Comments

    But in English. If I change the corresponding places in the template-tags.php line 132 and 184, it is not transferred to the display in the frontend. Only when I make the changes in the parent theme, the text in the frontend is changed to German.

    So the PHP file looks like this:

    if ( ! function_exists( 'sydney_entry_comments' ) ) :
    	function sydney_entry_comments() {
    		if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
    			echo '<span class="comments-link">';
    			comments_popup_link( esc_html__( '0 Kommentare', 'sydney' ), esc_html__( '1 Kommentar', 'sydney' ), esc_html__( '% Kommentare', 'sydney' ) );
    			echo '</span>';
    		}		
    	}
    endif;

    Note the three German words.

    This is actually not the point of a child theme, that I have to manually change this PHP file again with every update of the parent theme to get this translation into German.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @thobie,

    I am sorry for the delay in response.

    As checked, I saw your changes have been applied already on both single post and posts archive pages.

    Just FYI, template-tags.php can’t be overwritten from child theme by replicating the file. Unless you put the code directly into your child theme’s main functions (functions.php file).

    Looks likely this query has been resolved. If so, may I request marking this topic as resolved, so you can raise a new topic for your other query? Or let me know if you have different concern.

    Thanks!

    Thread Starter Thobie

    (@thobie)

    Okay, thanks for the answer. Then where in functions.php do I need to make these changes in the child theme?

    Thread Starter Thobie

    (@thobie)

    I have searched the functions.php file in the parent and child themes for the words I am looking for in English. They are not present there.

    Do I need to paste the above code, in this case for the comments, from the template-tags.php file into the functions.php file in the child theme so that it is then also copied to the parent theme?

    Thread Starter Thobie

    (@thobie)

    I read your post again, it says yes that I can not change this code in the template-tags.php, because it is not transferred to the parent theme.

    But I have to add the code for comments and author in the functions.php of the child theme.

    This I have now done. And the changes are applied in the frontend! Now at least I don’t have to make these changes every time I update the parent theme.

    Thank you. Problem solved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Changes in the child theme are not applied’ is closed to new replies.