• Resolved bharathiviswa

    (@bharathiviswa)


    Hi,

    We are migrating from Yoast plugin to Rank Math plugin recently in our site, after that the below code which written for duplicate title tag for pagination pages not working in Rank Math which is previously working in Yoast. Now in Rank Math all the paginated pages has same title without page number in the end.

    Example: The below code adds “| page 2” in the end of title in Yoast Plugin.

    Code:

    function blog_multipage_title($title)

    {

           global $page;

            $paged = get_query_var(‘paged’) ? get_query_var(‘paged’) : 1;

           !empty($page) && 1 < $page && $paged = $page;

          $paged > 1 && $title .= ‘ | ‘ . sprintf( __(‘Page %s’), $paged );

         return $title;

     }

     add_filter(‘wpseo_title’, ‘blog_multipage_title’,100,1);

    Can you please provide solution for this to avoid duplicate title tags for pagination in Rank Math.

    Thanks!

    Bharathi Viswa.

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @bharathiviswa,

    Thank you for contacting support.

    You can try to use the specific filter from our plugin to change the titles and change the last line only to read:
    add_filter(‘rank_math/frontend/title’, ‘blog_multipage_title’,100,1);

    Hope this helps solve your issues.

    Don’t hesitate to get in touch if you have any other questions.

Viewing 1 replies (of 1 total)
  • The topic ‘Avoid Duplicate title tags in pagination of Rank math’ is closed to new replies.