WordPress.org

Ready to get started?Download WordPress

Forums

WP Vegas
[resolved] Possible conflict with next_post_link()? (3 posts)

  1. niknaz
    Member
    Posted 6 months ago #

    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/

  2. niknaz
    Member
    Posted 6 months ago #

    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.

  3. jamesdbruner
    Member
    Plugin Author

    Posted 6 months ago #

    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)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.