WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Possible conflict with next_post_link()?

[Resolved] Possible conflict with next_post_link()?

  • Hi There,

    Happy New Year! You have a great plugin — thank you!

    I have a question/issue, perhaps you have some insights. I’m creating a custom theme and am using your plugin for individual post pages. In my single.php page (actually, I’m using a custom post type, so it’s single-POSTTYPE.php), I have a navigation menu for users to click to the next post and previous post using next_post_link() and previous_post_link(). Without the Vegas plugin, this navigation works fine. However, as soon as I add the Vegas shortcode for the slide I want to use, the navigation points to the next Vegas slide page instead of the next post page.

    This is happening with both WP 3.6.1 & 3.8. I’m currently running WP 3.8 & Vegas 1.5.

    I have a feeling this may not be resolve-able because Vegas is a custom post-type as well.

    I’m on developing locally right now, unfortunately!

    http://wordpress.org/plugins/vegas-fullscreen-background-slider/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Okay. Solved the issue. Phew.

    You’re (of course) calling a loop to retrieve the slides from within the content area. Which means, when I was using the next_post_link() it was doing it from your loop and retrieving the next Vegas slide page. In order to have the next_post_link() retrieve the next post instead of Vegas slide, I either need to call the loop again for the post-type or move your shortcode outside of the content box to somewhere after I use the navigation links.

    So I am using Advanced Custom Field plugin and creating custom fields on each post page for the pertinent Vegas slide info (slide ID, fade, delay, etc) and in my template file, I am using do_shortcode() after my navigation divs.

    Whew. Works.

    Thanks again!! This plugin is fantastic.

    Plugin Author jamesdbruner

    @jamesdbruner

    Good work figuring that out! I’m glad you like it. One of my new years resolutions is to nail down some time when I can work on this thing again so hopefully 1.6 will be out in the near future (though I’ve been saying that for almost a year now)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Possible conflict with next_post_link()?’ is closed to new replies.