[resolved] next_post_link/previous_post_link (3 posts)

  1. yoyurec
    Posted 4 years ago #

    In WP next_post_link & previous_post_link functions doesn't support custom taxonomy (with custom post types all is OK). Polylang plugin uses own taxonomy, so when we use loop with Next\Prev links we get posts in all languages (((

    To fix this try to install "Ambrosite Next/Previous Post Link Plus" plugin and replace default WP functions to this one:

    <div class="navbutton nav-previous">
    	<?php next_post_link_plus( array('in_same_tax' => 'language') ); ?>
    <div class="navbutton nav-next">
    	<?php previous_post_link_plus( array('in_same_tax' => 'language) ); ?>

    PS: tnx for 0.4 version, a lot of work done! my wishlist became empty )))


  2. yoyurec
    Posted 4 years ago #

    sorry, in prev link typing error -
    <?php previous_post_link_plus( array('in_same_tax' => 'language') ); ?>

  3. Chouby
    Plugin Author

    Posted 4 years ago #

    To be honest, except for the languages, I don't use custom taxonomies in my site, so my tests were obviously not complete. I will try to correct this in the next release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Polylang
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic