zkirshner
Newbie
Just Getting Started
Member Likes (0)
Hi,
I'm trying to password protect the content in one of a set of three JQuery Tabs, but the Password Protect plugin shortcodes aren't working in this situation. They work fine in a non-tabbed post. I'd love to know of a way to make this work, or if it's even possible.
Here's the JQuery code being used:
<script>
(function($) {
$(document).ready(function() {
$("#tabs").tabs();
});
})(jQuery);
</script>
<div id="tabs">
<div id="door1" >
</div>
<div id="door2" >
</div>
<div id="door3" >
[protect password=""][/protect]
</div>
</div>

Responses (4)
People Person (joined February 2012) Likes (0)
zkirshner
Hi and Welcome to the WPMUDEV Community!
I do not think the plugin was made to work in this manner. I believe that it is geared more towards actually wrapping the content you want to protect. Meaning that you would have to use the shortcode around the actual content on the third page, not the tab itself.
Does this make sense?
I'm not jQuery savvy however, so I can ask around for a second opinion. Bottom line however, this is not going to work with the way the plugin is made to operate, I'm very sorry.
Best,
Kimberly
Developer (joined January 2012) Likes (0)
@zkirshner, Can I trouble you to paste the code again using the code buttons or some other external paste bin system. The code you posted is not selectable.
Also, can you tell me with tab engine you are using jQuery-UI or some other and version? I want to setup my system in the exact same manner.
Member (joined June 2012) Likes (0)
@KimberlyL, thanks for your quick response. I hope there's a way to get this working, but understand if it's not possible.
@PaulM, Sure, I'll repost the code below. I believe we using jQuery-UI. Thanks for your help!
`<script>
(function($) {
$(document).ready(function() {
$("#tabs").tabs();
});
})(jQuery);
</script>
<div id="tabs">
<div id="door1" >
</div>
<div id="door2" >
</div>
<div id="door3" >
[protect password=""][/protect]
</div>
Member (joined June 2012) Likes (0)
@PaulM, Sorry, I used the code tab, but those three items in the middle still don't show up! Anyway, they are each a list item in an unordered list. Each list items contains a link to "#door1", "#door2", or "#door3" and opens the respective tab. Does that help? Thanks!
Become a member