Support » Plugin: Post Types Order » [Plugin: Post Types Order] Previous / Next Navigation – Wrong order

Viewing 6 replies - 1 through 6 (of 6 total)
  • Sorry, I gave the wrong versions. Here are the right ones :

    Versions :
    WP 3.3.2
    Advanced Post Types Order

    Plugin Author nsp-code


    This is an expected behavior under the ON/Custom AutoSort Option. Only when AutoSort is turned ON the next/previous links are updated.

    In this case you will need to use the previous_post_type_link and next_post_type_link functions which should replace the default previous_post_link and next_post_link

    Usage example:
    previous_post_type_link( ‘%link’, __( ‘<span class=”meta-nav”>←</span> Previous’, ‘twentyeleven’ ), FALSE, ’14’, ‘category’ );

    where the arguments are 
    $format, $link, $ignore_custom_order, $term_id, $taxonomy_name

    Ok but what I need are the posts :

    $nextPost = get_adjacent_post(false,'',false);
    $prevPost = get_adjacent_post(false,'',true);

    And it doesn’t work with it.

    Plugin Author nsp-code


    To retrieve the post data you can use the following:

    apto_get_adjacent_post ($ignore_custom_sort, $term_id = ”, $taxonomy = ”, $previous)

    The $previous require a Boolean variable, TRUE if you need previous post or FALSE for next.

    The function is relative to the default query $post variable content, so if you need to use it along with a custom query, make sure you use a new WP_Query call.

    That seems ok even if the order is weird if you haven’t clicked yet on the “update” button in the “re-order” screen.

    Thank you.

    Plugin Author tdgu


    This may return different results that the default get_adjacent_post since the apto_get_adjacent_post can return next/previous for a term objects list instead. So this is an expected result, unless you need to use the archive as reference in which case you may want to use the default get_adjacent_post or use empty params for the apto_get_adjacent_post

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Post Types Order] Previous / Next Navigation – Wrong order’ is closed to new replies.