WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
[resolved] next_post_link/previous_post_link (3 posts)

  1. yoyurec
    Member
    Posted 2 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>
    <div class="navbutton nav-next">
    	<?php previous_post_link_plus( array('in_same_tax' => 'language) ); ?>
    	</div>

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

    http://wordpress.org/extend/plugins/polylang/

  2. yoyurec
    Member
    Posted 2 years ago #

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

  3. Chouby
    Member
    Plugin Author

    Posted 2 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

About this Topic