Created
April 30, 2018 06:20
-
-
Save rushijagani/5c26bc119540236b16e59c79e4f516a1 to your computer and use it in GitHub Desktop.
Custom post type static titles.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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