Skip to content

Instantly share code, notes, and snippets.

@kylephillips
Created October 10, 2016 17:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylephillips/9433be6986b402e7b4e8a0b03f8c5ed9 to your computer and use it in GitHub Desktop.
Save kylephillips/9433be6986b402e7b4e8a0b03f8c5ed9 to your computer and use it in GitHub Desktop.
add_filter('the_title', 'filterNestedPagesTitles', 10, 3);
function filterNestedPagesTitles($title, $post_id, $view = false)
{
if ( !is_admin() ) return $title;
$screen = get_current_screen();
if ( $screen->base != 'toplevel_page_nestedpages' ) return $title;
if ( !isset($view) || $view != 'nestedpages_title' ) return $title;
// Code to configure custom title here
$title = 'Custom Title';
return $title;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment