Skip to content

Instantly share code, notes, and snippets.

@bigdigital
Created February 10, 2017 19:26
Show Gist options
  • Save bigdigital/c351cc0d8140b7668131519417c62339 to your computer and use it in GitHub Desktop.
Save bigdigital/c351cc0d8140b7668131519417c62339 to your computer and use it in GitHub Desktop.
Redefine page titles in The7 (work since 4.2.1)
//put this function in your main or child theme function.php
function redefine_page_title($default_page_title_strings)
{
$my_page_title_strings = array(
'search' => __( 'Search Results for: %s', 'the7mk2' ),
'category' => __( 'Category Archives: %s', 'the7mk2' ),
'tag' => __( 'Tag Archives: %s', 'the7mk2' ),
'author' => __( 'Author Archives: %s', 'the7mk2' ),
'day' => __( 'Daily Archives: %s', 'the7mk2' ),
'month' => __( 'Monthly Archives: %s', 'the7mk2' ),
'year' => __( 'Yearly Archives: %s', 'the7mk2' ),
'archives' => __( 'Archives:', 'the7mk2' ),
'page_404' => __( 'Page not found', 'the7mk2' ),
'blog' => __( 'Blog', 'the7mk2' ),
);
return $my_page_title_strings;
}
add_filter( 'presscore_page_title_strings', 'redefine_page_title' ,30 , 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment