New answers tagged

1

To expand your conditional to check for display of one of your terms, you can do this: if ( is_page() ) { the_title(); } elseif ( is_tag() ) { single_tag_title(); } elseif ( is_tax( 'mtags' ); ) { single_term_title('More Tags: '); } However, if you use your theme's custom taxonomy template for this taxonomy, taxonomy-mtags.php, then you can ...


1

SOLUTION: So, it turned out (of course) I myself was causing the problem (...) I am getting the widgets with the 'the_widget()' method and sending the instance params along as I go. The params are query-string-style parameters and are of course 'glued' together with ampersands. Now , I wasn't encoding the individual params so the query string was looking ...


4

I ran your filter in my development area. It didn't work. Then I switched off the Yoast SEO plugin, which I knew was also messing with the page title. Then it worked. So my suggestion would be it is another plugin that is messing with it. In the case of Yoast, it was a filter call to pre_get_document_title that returned non empty. In that case ...


3

After some experimenting I came to the following suggestion: could it be, that the <title> tag is "hard coded" inside your parent theme's header.php? If that is the case, you could try to remove the <title> tag from your child theme's header.php (copy your parent's header.php into your child theme folder) and then add the theme support back ...


3

Having read your post from top to botom and bottom to top, you have in all probabilty a filter that is passing a title through the pre_get_document_title filter. The clue here the following statement: I've also tried pre_get_document_title, which does fire on page load, Looking at the soure code for wp_get_document_title(), we see the following code: ...


2

If the parent theme does not declare support for title-tag you can do it like this in child theme /** * Theme support should be added on `after_setup_theme` */ function add_theme_support_child() { add_theme_support( 'title-tag' ); } add_action( 'after_setup_theme', 'add_theme_support_child', 11 ); Filter document_title_parts expected return type ...



Top 50 recent answers are included