• Resolved davidsanger

    (@davidsanger)


    I have been using Gestures on mobile to swipe left/right to get to the next post based on the <link rel=”next”..> and <link rel=”previous”..> tags inserted by WordPress

    When I activate Yoast SEO 5.5.1 the next and previous tags in the header disappear. How do I enable them?

    The Yoast SEO API documents filters wpseo_prev_rel_link and wpseo_next_rel_link showing how to disable them. I want the tags to be there.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support marcanor

    (@marcanor)

    The Yoast plugin is expected to insert the correct tags when working with paginated content. It will insert the previous page tag, the next page tag as well as the canonical tag for the page itself.

    Our plugin utilizes the built-in WordPress core functions to recognize pagination. Some plugins and theme developers have modified or created their own method of adding pagination. You can get more information on how to implement pagination in your theme by following the instructions here: https://kb.yoast.com/kb/is-the-plugin-compatible-with-paginated-content/

    You can also check if the problem has to do with your theme by temporarily switching to a standard theme like Twenty Seventeen and checking the source of your site and seeing if the tags reappear.

    Thread Starter davidsanger

    (@davidsanger)

    Thanks marcanor. The problem is not with pagination but with next and previous rel links to the next and previous posts which WordPress normally produces on posts.

    It is not theme related. I tested it by switching to the Twentyseventeen and the behavior is just the same.

    Without Yoast SEO I have these tags in the header

    <link rel=’prev’ title=’Saint John’ href=’https://bayareapeaks.com/napa/mount-saint-john/&#8217; />
    <link rel=’next’ title=’Discovery’ href=’https://bayareapeaks.com/alameda/discovery-peak/&#8217; />

    When I activate the Yoast plugin they disappear.

    (this is for page https://bayareapeaks.com/stanislaus/mount-oso/ )

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    @davidsanger This is to be expected. Yoast SEO removes the rel='next' and rel='prev' from single post page for reason. The rel='next' and rel='prev' tells you which pages are previous or next in a paginated archive. It indicates a relation between those pages.

    So, having rel='next' and rel='prev' on single posts page (without paginated content) doesn’t make sense. The rel='next' and rel='next' should only have on the paginated archives.

    The _Next_ and _Previous_ that shows in your single posts page only redirect you to a different post and it’s not related to the paginated content as both posts are different.

    We don’t have a feature to turn this off since it’s important to remove this from single posts page.

    Thread Starter davidsanger

    (@davidsanger)

    Well it is part of WordPress core functions ( adjacent_posts_rel_link_wp_head ) and is used by Firefox for prefetch as well as for certain plugins for mobile gesture support (swipe next and previous post).

    But yes I see that behavior conflicts with multipage post support.

    I’ll find another way to restore the function. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to get link rel=”next” in header’ is closed to new replies.