Can’t change the title tag with wp_title filter

I’m using a theme child of Ultra Theme. This theme is using this :

add_theme_support( ‘title-tag’ );

I’d like to customize the title tag of all posts & pages, here is my code :

add_filter( ‘wp_title’, ‘my_custom_title’, 10, 2);
function my_custom_title() {
return(“Foo bar”);
}

The code is not working and I can’t figure out why !

Read more here:: Can’t change the title tag with wp_title filter

Leave a Reply

Your email address will not be published. Required fields are marked *