Problems with overwrite!
-
I have a problem about my child theme (file highstake-child). I need to translate the blog from english to portuguese but the child theme do not overwrite the modifications that I wrote.
File inc/extras.php
Original:function highstake_lite_extend_archive_title( $title ) { if ( is_category() ) { $title = sprintf( esc_html__( 'posts in %s category', 'highstake-lite' ), '<span>' . single_cat_title( '', false ) . '</span>' ); } elseif ( is_tag() ) { $title = sprintf( esc_html__( 'posts in %s tag', 'highstake-lite' ), '<span>' . single_tag_title( '', false ) . '</span>' ); } elseif ( is_author() ) { $title = sprintf( esc_html__( 'posts by %s', 'highstake-lite' ), '<span>' . get_the_author() . '</span>' ); } elseif ( is_search() ) { $title = sprintf( esc_html__( 'Search Results for: %s', 'highstake-lite' ), '<span>' . get_search_query() . '</span>' ); } else { $title = esc_html__( 'Latest News', 'highstake-lite' ); } return $title; }Translated:
function highstake_lite_extend_archive_title( $title ) { if ( is_category() ) { $title = sprintf( esc_html__( 'Publicações pela categoria %s', 'highstake-lite' ), '<span>' . single_cat_title( '', false ) . '</span>' ); } elseif ( is_tag() ) { $title = sprintf( esc_html__( 'Publicações pela tag %s', 'highstake-lite' ), '<span>' . single_tag_title( '', false ) . '</span>' ); } elseif ( is_author() ) { $title = sprintf( esc_html__( 'Publicações por %s', 'highstake-lite' ), '<span>' . get_the_author() . '</span>' ); } elseif ( is_search() ) { $title = sprintf( esc_html__( 'Resultado da Pesquisa: %s', 'highstake-lite' ), '<span>' . get_search_query() . '</span>' ); } else { $title = esc_html__( 'Últimas notícias', 'highstake-lite' ); } return $title; }The page I need help with: [log in to see the link]
The topic ‘Problems with overwrite!’ is closed to new replies.
