Skip to content

Instantly share code, notes, and snippets.

@rushijagani
Created April 30, 2018 06:20
Show Gist options
  • Save rushijagani/5c26bc119540236b16e59c79e4f516a1 to your computer and use it in GitHub Desktop.
Save rushijagani/5c26bc119540236b16e59c79e4f516a1 to your computer and use it in GitHub Desktop.
Custom post type static titles.
<?php>
/**
* Static page header title on case-study post types
*/
add_filter( 'astra_advanced_header_title', 'page_header_case_study_title' );
function page_header_case_study_title( $title ) {
// Add your condition where you want to update the Page Header title.
if ( is_singular( array( 'case-study' ) ) ) {
$title = "Case Study";
}
return $title;
};
/**
* Second static page header title on member post types
*/
add_filter( 'astra_advanced_header_title', 'page_header_member_title' );
function page_header_member_title( $title ) {
// Add your condition where you want to update the Page Header title.
if ( is_singular( array( 'member' ) ) ) {
$title = "The Elite100 Directory";
}
return $title;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment