• Resolved flaschenzug22

    (@flaschenzug22)


    I have a question about the yoast pagination.
    I added a new wp_query like this:

    $args = array(
       'post_type' => 'mycpt',
       'posts_per_page' => -1,
    );
    $query = new WP_Query( $args );

    The posts are displayed right and there is no pagination.
    But in the meta tags i’ll find this line:
    <link rel="next" href="https://inn-aktiv.at/angebote/studiengaenge/page/2/">

    Do I have to change something else?
    Thanks

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Michael Ti?a

    (@mikes41720)

    Hi @flaschenzug22

    We’re not sure of your implementation here, but we do know that the Yoast SEO plugin should handle default WordPress pagination with the rel="prev" & rel="next" tags.

    You can learn more about it here – https://yoast.com/help/is-the-plugin-compatible-with-paginated-content/

    Thread Starter flaschenzug22

    (@flaschenzug22)

    But if posts_per_page is set to -1, there shouldn’t be any prev or next links in the meta tags … right ?
    That would make sense at least in my opinion.

    • This reply was modified 2 years, 7 months ago by flaschenzug22.
    Thread Starter flaschenzug22

    (@flaschenzug22)

    As long as there is no solution here, I have completely disabled the meta data:

    If anyone want’S to do the same, just add the following lines to your functions.php

    // remove page next / prev from meta
    add_filter( 'wpseo_next_rel_link', '__return_false' );
    add_filter( 'wpseo_prev_rel_link', '__return_false' );
    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    We aren’t exactly familiar with your implementation to modify the pagination being handled by the Yoast SEO plugin, but we do have several filters documented to modify the pagination here.

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    We’ll be closing this thread as there’s no new activity.

    Thanks for your understanding!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘No pagination but prev and next link in meta’ is closed to new replies.