Reply To: Dynamic Page Title

Home Forums Support Dynamic Page Title Reply To: Dynamic Page Title

Home Forums Support Dynamic Page Title Reply To: Dynamic Page Title

#226456
Juergen

Hi Tom,

thanks for your quick answer.

I tried a lot solutions along that direction, I think the following is the best but with no success.

At the end of the theme function.php file I added the following code:

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' ) {
        //Some silly example
        $title = "Some other title" . $title;;
    }

    return $title;
}

What am I doing wrong?

Thanks a lot for more details on this feature.

Regards,
Juergen