WordPress.org

Ready to get started?Download WordPress

Forums

Using a modal window with in the WordPress loop (2 posts)

  1. mamacita007
    Member
    Posted 2 years ago #

    I've been asked to create popups for a individual bios on a sidebar.
    Currently, when a user clicks a person's bio it goes to that persons bio page. However, they no longer want it to do this and are requesting that when a persons picture is clicked, it should show up in a modal window. I'm using jQuery UI to create the modal and that works fine but the issue is that the bio section is in a loop that outputs all of the people (only 4 people right now). However, when I go to click on a person, all of the modals appear on top of each other (because of the loop). Obviously, this is not the intended effect. I just need some help figuring out how to get the bio to appear ONLY for the person that was clicked. If I take the modal code out of the loop, I only get the popup for the last person in the loop. Yet, again, not the intended effect. Any suggestions on how to do this would be most welcomed.

    The code is as follows:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

  2. mamacita007
    Member
    Posted 2 years ago #

    Code can be found here:

    http://pastebin.com/7HrgYprP

Topic Closed

This topic has been closed to new replies.

About this Topic