Support » Plugin: The SEO Framework » Canonical Tag on Front Page

  • Resolved Bichareh

    (@bichareh)


    Hi,

    the canonical tag on my static front page is broken. On the pages 2, 3, 4, etc. the canonical tag points to page 1.

    I use the latest plugin Version 2.7.0.

    Thanks!

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter Bichareh

    (@bichareh)

    Oh no..my mistake, doesn’t work there too.

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @bichareh,

    Bummer!

    Here’s another snippet, that will always remove the front-page canonical URL output:

    add_filter( 'the_seo_framework_rel_canonical_output', 'my_canonical_url_adjustments', 10, 2 );
    /**
     * Empties the canonical URL (thus preventing output) on the front page.
     */ 
    function my_canonical_url_adjustments( $url = '', $id = 0 ) {
    
    	if ( is_front_page() )
    		$url = '';
    
    	return $url;
    }

    The same function names as in the previous snippet have been used. So this one is incompatible with the previous snippet I gave. Once again, the code above has not been tested.

    If even this snippet doesn’t work, then we can assume other issues are present.

    Cheers! ๐Ÿ™‚

    Thread Starter Bichareh

    (@bichareh)

    Hah, don’t worry, we’ll get there!

    That’s what I found out: Your “Title Fix” plugin pretend the first code from working. If I deactivate it, the “Noindex” will be detected and the second code with the canonical removal works!

    But unfortunately the “1” is still there and my featured article section gone. And without the “title fix” plugin the title of my front page is crap.

    We are almost finished, I can smell it!

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @bichareh,

    That’s odd, the title fix plugin merely rewrites buffers, and should not interact with the URL generation nor the robots output of The SEO Framework.

    I also notice you’ve updated the front-page’s pagination grid layout, which effectively removes pagination all together. At least, on the front-page that is.

    If not even the last snippet I provided works, then I’m out of options to deal with this – other than tweaking the internal code of The SEO Framework.

    Thread Starter Bichareh

    (@bichareh)

    Hi, you are absolutely right. I changed the front page, because of all the problems. No Seo Plugin could handle my page. My front page is completely static now. Maybe its better for SEO anyway.

    Thanks for your help!

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi @bichareh,

    It might even be better, but I’m not certain.
    It does however keep fresh content on the front-page at all times, and the latest 12 articles from the AJAX list are correctly visible without the need for Javascript. Which is a good thing, and removes the need to feed thin content to Google.

    Only time will tell (in a week or two) if your website is more prominently shown in Google’s search results.
    This can be evaluated by taking notes from Google’s Search Console’s “Search Analytics” page, through multiple options like “Position” and “CTR”.

    Best of luck! ๐Ÿ™‚

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Canonical Tag on Front Page’ is closed to new replies.