WordPress.org

Ready to get started?Download WordPress

Forums

All in One SEO Pack
Paginated Custom Search Engine Results Causing Duplicate Title Tags (8 posts)

  1. Grace Massa Langlois
    Member
    Posted 10 months ago #

    How do I prevent duplicate title tags for page 2 custom search engine results?

    For normal paginated content, ie. home page, Page 2, Page 3 etc is added to the title tag but for search results that is not happening.

    Here are the two pages that are setting off the duplicate title tags:

    http://gracessweetlife.com/?s=cream+puff
    http://gracessweetlife.com/page/2/?s=cream+puff

    Any assistance would be appreciated.

    Thanks,

    Grace

    http://wordpress.org/plugins/all-in-one-seo-pack/

  2. Peter Baylies
    Member
    Plugin Author

    Posted 10 months ago #

    Grace,

    All in One SEO Pack currently does not add pagination to the Search results page title, it leaves that up to the theme. I'll look into the feasibility of adding this as a future plugin feature.

  3. Grace Massa Langlois
    Member
    Posted 10 months ago #

    Hmm I wonder how I implement the fix, another thing to add to my long list of "How do I fix this?" Peter.

    Thanks for your help.

  4. timstl
    Member
    Posted 10 months ago #

    Looking to do the same thing. Did you ever find a fix? I thought I could implement via the aioseop_title_page filter, but so far no luck.

  5. Peter Baylies
    Member
    Plugin Author

    Posted 10 months ago #

    timstl,

    Until there is a real option for this, try filtering on aioseop_title as that filters on all titles in All in One SEO Pack, and check for a search by using is_search().

  6. timstl
    Member
    Posted 10 months ago #

    Ah. Thanks. That is the filter I was looking for.

    Here is what I added to functions.php, if anyone else needs to do this:

    function do_search_title($title)
    {
    	if (is_search())
    	{
    		global $paged;
    		if ($paged > 0) { $title .= ' - Part ' . $paged; }
    	}
    	return $title;
    }
    add_filter('aioseop_title','do_search_title');
  7. 2besure
    Member
    Posted 9 months ago #

    timstl, where did yo place the code?

  8. timstl
    Member
    Posted 9 months ago #

    In my theme's functions.php file. The location in the file shouldn't matter, just drop it in the bottom.

Reply

You must log in to post.

About this Plugin

About this Topic