WordPress.org

Forums

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

  1. Grace Massa Langlois
    Member
    Posted 2 years 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 2 years 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 2 years 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. Tim
    Member
    Posted 1 year 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 1 year 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. Tim
    Member
    Posted 1 year 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 1 year ago #

    timstl, where did yo place the code?

  8. Tim
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • All in One SEO Pack
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic