• Resolved Jim

    (@jwmc)


    I was trying to get my page header and browser tab to show “page name | site name”. The SEO framework I think did it for browser tabs only.

    To get it to show like that in the header (theme GeneratePress), I was able to filter option_blogname to make it page name | site name.

    However, now the browser tab shows “page name | page name | site name”. Deactivating SEO Framework did not fix it, just changed the first separator to “-“.

    Does SEO put some permanent code somwhere to do that? Is there no option to turn that off?

    Thank you.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi @jwmc,

    The SEO Framework is active when it comes to its injection, so when you turn it off, it leaves no visible footprint.

    I see you’ve found a way to alter the title output; however, I now can’t see what you tried to achieve as I see different results.

    So, through assimilation of the actions you took, I think you should remove the filters you’ve had in place.
    I also think you should disable the option to remove the blog name in the Title settings.

    With those two alterations, you should get this: Page title | Blog name

    I could have misunderstood your goal. So please follow up when needed ?? Cheers!

    • This reply was modified 6 years, 9 months ago by Sybre Waaijer. Reason: Active, not passive
    Thread Starter Jim

    (@jwmc)

    I’m sorry for the confusion; I was playing with that SEO option to remove blog name and left it that way. I’ve switched it back.

    Yes, if I remove the filter, with SEO the browser tab is correct and what I want, but the title the theme puts in the header is the site name only.

    The filter fixes that, but makes the browser tab have the page title twice, as you see.

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @jwmc,

    I was under the impression that GeneratePress works great with TSF regarding titles.

    Could you show me the filter, so I can alter it a little so it’ll work as intended?
    You can share code by embedding it in backticks or use the “code” button at the top of the reply area. Thanks!

    Thread Starter Jim

    (@jwmc)

    Thank you. Here is the filter:

    add_filter( 'option_blogname', 'custom_option_blogname' );
    function custom_option_blogname( $name ){	
    	$site_name = $name;
    	$page_name = get_the_title($post->ID);
    	
    	if ( is_front_page() ) {
    		return $site_name; }
    	
    	// set title for most? all? pages
    	if( is_page() ) {
    		return "{$page_name} | {$site_name}"; }
    
            return $name; 
    }
    
    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @jwmc,

    You shouldn’t filter that option, all kinds of things can go wrong and it doesn’t go well with WordPress’ caching.

    Sidenote:
    The title in TSF consists of 4 parts:
    "prefix:" "page title" "separator" "blog name"
    The reason it returns double (or nothing) in browser tab title is because you’re filtering the “blog name” part, and adding the “page title” to it.

    More importantly, you’re now altering the “Site Name”.
    This will–thanks to various Schema.org annotations–let search engines think they’re dealing with different websites on each page. This is bad for SEO.

    When you open the Customizer, you can set various displaying options.
    At Site Identity, for example, you can hide the Site Title and Tagline.

    Please note that the top area in GeneratePress is meant to display your website name, not the page name.

    Also note that TSF only handles metadata, and doesn’t nor shouldn’t alter what’s displayed on the site for the visitor. Therefore, this is out of my hands.

    In any case, if you wish to have further assistance with altering the theme’s output, then you should contact GeneratePress support. They can provide directions to directly alter what’s displayed, without fiddling with WordPress core stuff nor damaging your future website.

    I’m sorry I can’t assist you any further, as this isn’t my area of expertise. Best of luck!

    Thread Starter Jim

    (@jwmc)

    OK, thank you very much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can’t turn Automated Title Settings off?’ is closed to new replies.