WordPress.org

Ready to get started?Download WordPress

Forums

Ambrosite Next/Previous Post Link Plus
End Post still showing (8 posts)

  1. rpetersnmt
    Member
    Posted 3 years ago #

    Wondering if anyone has experienced an issue where the End Post is still showing, even when the correct parameter has been set.

    'end_post' => false

    I'm using this great plugin to allow navigation between single items of a custom post type I created, inside a custom taxonomy. It is working great on all "interior" posts....but the items on each end of my query (first and last items) are not correct...nor can they be turned off/not shown.

    Is that making sense? Anyone else see something like this or have a solution? thx! Ross

    http://wordpress.org/extend/plugins/ambrosite-nextprevious-post-link-plus/

  2. ambrosite
    Member
    Plugin Author

    Posted 3 years ago #

    The default value for end_post is false (I neglected to mention that in the documentation). If you do not want to use the end_post feature, it would be best to leave that parameter out entirely.

    You will have to give me more details on the problem you are having. I do not understand what you mean when you say the items on each end of the query are not correct. A link to your site would also help.

  3. rpetersnmt
    Member
    Posted 3 years ago #

    Hmm....not sure what I'm doing wrong.

    Here's a link to a page using your plugin:

    http://www.montanaskatepark.org/ondeck-boards/nora-thompson/

    This is the first item in the category....but (at the bottom) you'll see where the "previous" link is still appearing...and to an item that seems pretty unrelated. The "next" link is correct...and all is well until the last item in the list...that one also shows the final link, again to a seemingly unrelated item.

    You can see the full category list here:

    http://www.montanaskatepark.org/ondeck-category/ondeck-6/

    My markup for each next/previous is:

    <?php next_post_link_plus( array(
    'order_by' => 'menu_order',
    'loop' => false,
    'end_post' => true,
    'format' => '%link »',
    'link' => '%title\'s Deck',
    'tooltip' => 'View Next Deck',
    'in_same_tax' => true
    ) ); ?>

    <?php previous_post_link_plus( array(
    'order_by' => 'menu_order',
    'loop' => false,
    'end_post' => true,
    'format' => '« %link',
    'link' => '%title\'s Deck',
    'tooltip' => 'View Previous Deck',
    'in_same_tax' => true
    ) ); ?>

    I've tried this with "end_post" set to both true and false...with no change that I could see. Any help is greatly appreciated.

    Thanks for the great plugin!

  4. ambrosite
    Member
    Plugin Author

    Posted 3 years ago #

    It looks to me like the links might be looping, but if you have 'loop' set to false that shouldn't be happening. How many different custom taxonomies have you set up? Are any of the posts assigned to more than one taxonomy? Also, what method are you using to set the menu_order field?

  5. rpetersnmt
    Member
    Posted 3 years ago #

    Thanks for looking into this so closely.

    I have just one custom taxonomy for this post type. Code below:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I'm using a plugin ("Post Types Order" - http://www.nsp-code.com/) to allow for drag/drop ordering of the post type. Initially I thought that maybe this was creating the issue....but the plugin just sets the 'menu_order' field and I use a stock query to retrieve those values:

    $term = get_query_var('term');
    $taxonomy = get_query_var('taxonomy');
    
    query_posts( 'posts_per_page=-1&'.$taxonomy.'='.$term.'&orderby=menu_order&order=ASC');

    [Please post code snippets between backticks or use the code button.]

    Again..thanks for any/all help here. :)

  6. ambrosite
    Member
    Plugin Author

    Posted 3 years ago #

    Well, my leading theory involved multiple taxonomies, but since you only have one ... in order to troubleshoot this further, I would need to look at your database. If this is important to you, contact me off-forum about it.

  7. rpetersnmt
    Member
    Posted 3 years ago #

    Problem solved...in case anyone needs this.

    As mentioned above, it was in fact an issue with the plugin 'Post Types Order' that caused things to misbehave for the first and last items.

    If you need drag/drop ordering, it appears that PostMash Custom (http://opperud.com/postmash_custom) is a better solution and works without issues.

    Ambrosite, thanks again for the support here.

  8. ambrosite
    Member
    Plugin Author

    Posted 2 years ago #

    The conflict with the Post Types Order plugin has been fixed in Post Link Plus 2.3, which is now available for download from the plugin directory:

    http://wordpress.org/extend/plugins/ambrosite-nextprevious-post-link-plus/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic