• Resolved mp3920014

    (@mp3920014)


    I want to hide php content
    I don’t know how to use it in php

    <?php echo do_shortcode("[passster password="your-password"]"); ?>
    my hidden content and php
    <?php echo do_shortcode("[/passster]"); ?>

    is not work

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey @mp3920014,

    that’s not working because the do_shortcode function does not work with closing shortcodes.

    But no worries, there is a special function inside of Passster which you can call:
    PS_Conditional::is_password_valid('your-password') { // right password was entered }

    Best regards,
    Patrick

    Thread Starter mp3920014

    (@mp3920014)

    Is good
    thank you

    <?php if ( true === passster\PS_Conditional::is_password_valid( '123456' ) ): ?>
    hidden content or php
    <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Php add shortcode’ is closed to new replies.