• Interesting scenario here… I actually need to use this feature in a page template file. Password is retrieved via the database, and put into the page via PHP coding. I need to split apart the shortcode, so I can properly provide the content… and then display it, once the password has been entered.

    When I do the code below, the output is “[ppwp] Empty content, invalid attributes or values”.

    I’d appreciate any guidance (other than asking me to upgrade) on this.

    Thanks!

    <?php
    	echo do_shortcode('[ppwp passwords="password1" whitelisted_roles="administrator"]&nbsp;<br />');
    ?>
    		<div><br />I'm baby jianbing affogato chicharrones pok pok YOLO, vinyl pickled fingerstache keytar master cleanse four loko bicycle rights literally quinoa paleo. Coloring book vexillologist cred selvage thundercats. Polaroid mustache migas, single-origin coffee sustainable adaptogen stumptown schlitz pop-up yr pork belly dreamcatcher. Helvetica 90's next level, narwhal echo park cronut cred hexagon. Knausgaard listicle poutine direct trade, chia before they sold out pork belly hashtag. Truffaut cardigan vegan mustache, fam raw denim whatever viral food truck tacos kogi. Bicycle rights air plant gluten-free bitters chia.</div>
    		<div><br />Hella fixie poutine, fingerstache subway tile pop-up butcher drinking vinegar photo booth tattooed biodiesel pinterest pitchfork. Succulents swag leggings vexillologist pitchfork drinking vinegar tilde banh mi before they sold out sartorial brooklyn literally four dollar toast flannel kale chips. Small batch YOLO 3 wolf moon fanny pack irony shaman vice sriracha lo-fi pickled. Man braid listicle portland direct trade hashtag single-origin coffee pour-over. Adaptogen sriracha 8-bit drinking vinegar direct trade pop-up roof party art party vexillologist bitters before they sold out. Helvetica irony photo booth, tofu squid taxidermy DIY af cornhole gastropub actually poke.</div>
    		<div><br />Lyft thundercats chia vexillologist listicle biodiesel mlkshk vinyl pabst messenger bag. Air plant narwhal pour-over, occupy crucifix slow-carb locavore twee 3 wolf moon mustache ramps. Bitters vegan organic selfies blue bottle godard coloring book. Tofu flexitarian echo park lo-fi yuccie small batch master cleanse iceland church-key cloud bread sriracha put a bird on it wayfarers kinfolk cliche. Bespoke +1 vape keytar. Edison bulb chillwave retro tote bag VHS.</div>
    		<div><br />Dummy text? More like dummy thicc text, amirite?</div>
    <?php
    	echo do_shortcode('[/ppwp]');
    ?>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @bearlydoug,

    Thanks for reaching out to us with a clear explanation.

    Yes, you don’t have to upgrade to password protect your custom page template.

    The protection doesn’t work because you doesn’t insert your content the right way.

    We’ve put up a few sample codes for your reference in the link above.

    Can you please check it out and let us know if it works?

    First, thank you for the suggestion. I went with Method #1. Now dealing with another issue…

    <?php
    	echo do_shortcode('[ppwp passwords="' . $scParental->word1 . '" whitelisted_roles="administrator"]' . $theContent . '[/ppwp]');
    ?>

    The password IS being outputted correctly (I see it while logged in as Admin), since I’m also outputting it as a <form> field. Whether I do the database extracted password, or a manually typed in password, I keep getting “Please enter the correct password!”.

    Hi @bearlydoug,

    To assist you better, do you mind sending the page URL for us to take a look at?

    You may want to drop us an email to hello(at)preventdirectaccess.com for faster response and better support from us.

    URL sent via email. ??

    Thanks!

    I need to note that this ended up being a very uniquely solved situation. Out of respect for the time that the BWPS teamies took, I will not post the changes I needed to do, anywhere.

    That said, the fact that the BWPS team *did* go above and beyond for my situation is amazing. If you were on the fence about purchasing their pro edition, I definitely encourage you to do so, if only to support the BWPS team, financially. You will not be disappointed with the support staff, for sure.

    This plugin does exactly what it needs to do, and I am appreciative that it exists.

    Thank you, BWPS Teamies, for everything!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Issues with do_shortcode formats’ is closed to new replies.