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:
- The topic ‘Using a modal window with in the WordPress loop’ is closed to new replies.