Reply To: How do I manipulate the page titles?

Home Forums Support How do I manipulate the page titles? Reply To: How do I manipulate the page titles?

Home Forums Support How do I manipulate the page titles? Reply To: How do I manipulate the page titles?

#188737
Pete

or how could I edit this snippet so that I can free add some wp template tags

<?php add_action( ‘after_setup_theme’, ‘theme_functions’ );
function theme_functions() {
add_theme_support( ‘title-tag’ );
}
add_filter( ‘wp_title’, ‘custom_titles’, 10, 2 );
function custom_titles( $title, $sep ) {
//Check if custom titles are enabled from your option framework
if ( ot_get_option( ‘enable_custom_titles’ ) === ‘on’ ) { ?>
//Something like <?php if( is_sticky()) { ?>
//               <?php } else { ?>
//                <?php } ?>

$title = “Some other title” . $title;;
<?php }
return $title;
} ?>
  • This reply was modified 7 years, 11 months ago by Pete.