• Resolved julesrsuarez

    (@julesrsuarez)


    Hi!

    This is a brilliant plugin and very useful. I just want to know if I can use the form as a shortcode so I can put it on a page where they can inset the password. If yes, what is the shortcode then?

    Basically I have a page where they users will put their codes to enter the password-protected site and when they enter the code correctly, they will be redirected to the page.

    Jules

    • This topic was modified 5 years, 5 months ago by Jan Dembowski.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Andreas Münch

    (@andreasmuench)

    Hi Jules,

    there is no shortcode for using this plugin.

    You simply add additional passwords in the backend on the password protected page.
    If you need a full members area over multiple pages you probably need a membership plugin.

    Hope that helps

    Thread Starter julesrsuarez

    (@julesrsuarez)

    Hi Andreas,

    Thank you for your response. Yes, I understand how the plugin work. I know how to put multiple passwords on the password-protected page. As I explained on my post, what I need is to add that form (This content is password protected. To view it please enter your password below…) on another page. I think the link I provided redirected the non members to another link that’s why you are seeing a different page. Does that make sense?

    Jules

    Plugin Author Andreas Münch

    (@andreasmuench)

    Hi Jules,

    to add the form on a page you need to set the page visibility of that page to password-protected.
    This is the only way to add the form to a page.

    Andreas

    Thread Starter julesrsuarez

    (@julesrsuarez)

    Hi Andreas,

    Again, thanks for the quick response. What I did is inspect the page and got the code and used it on another page. I used this code. It appears now, but the function is not working:

    <script type=”text/javascript” id=”wpuf-language-script”>
    var error_str_obj = {
    ‘required’ : ‘is required’,
    ‘mismatch’ : ‘does not match’,
    ‘validation’ : ‘is not valid’
    }
    </script>

    <span class=”entry-title rich-snippet-hidden”>Protected: VIP Club Homepage</span><span class=”vcard rich-snippet-hidden”>div class=”post-content”></span>
    <div id=”wpppass” class=”wpppass-area square”>
    <div class=”wpppass-top-text”></div>
    <div class=”wpppass-top-text”>
    <h3>This page is for VIP Club members only.</h3>
    </div>
    <form class=”four” action=”https://amz-pets.com/wp-login.php?action=postpass&#8221; method=”post”><label for=”pwbox-1191″>Access code </label><input id=”pwbox-1191″ maxlength=”20″ name=”post_password” size=”20″ type=”password” /><input class=”fusion-button button-default fusion-button-default-size” name=”Submit” type=”submit” value=”Submit” /></form>
    </div>

    Thread Starter julesrsuarez

    (@julesrsuarez)

    And by the way, I don’t know why it’s showing like that. Even on the password-protected page. I tried fixing the CSS but no success for the spacings between the box field and the button.

    Plugin Author Andreas Münch

    (@andreasmuench)

    I′m not sure what you are trying to do.
    Do you just want to style the standard form in another way?

    Thread Starter julesrsuarez

    (@julesrsuarez)

    See here: [ redundant link removed ]

    I managed to put the form from the password-protected page that I made using this code:

    <script type=”text/javascript” id=”wpuf-language-script”>
    var error_str_obj = {
    ‘required’ : ‘is required’,
    ‘mismatch’ : ‘does not match’,
    ‘validation’ : ‘is not valid’
    }
    </script>

    <span class=”entry-title rich-snippet-hidden”>Protected: VIP Club Homepage</span><span class=”vcard rich-snippet-hidden”>div class=”post-content”></span>
    <div id=”wpppass” class=”wpppass-area square”>
    <div class=”wpppass-top-text”></div>
    <div class=”wpppass-top-text”>
    <h3>This page is for VIP Club members only.</h3>
    </div>
    <form class=”four” action=”https://amz-pets.com/wp-login.php?action=postpass” method=”post”><label for=”pwbox-1191″>Access code </label><input id=”pwbox-1191″ maxlength=”20″ name=”post_password” size=”20″ type=”password” /><input class=”fusion-button button-default fusion-button-default-size” name=”Submit” type=”submit” value=”Submit” /></form>
    </div>

    The form that I’m talking about is below, from the “This page is for VIP Club members only. Access code” until the SUBMIT button. That’s the form that shows up when you go to the password-protected page (which you cannot view because it’s for members only.) But as you can see, I managed to display it there in a different page, but when you click submit, it’s not working. Does that make sense? I can give you an access to see the private page if you want to. Just give me your email so I can send you.

    Jules

    • This reply was modified 5 years, 5 months ago by Jan Dembowski.
    Thread Starter julesrsuarez

    (@julesrsuarez)

    Here’s the password-protected page: https://ibb.co/gZRDCrF

    And here’s the page that I inserted the code that I’m trying to make the form work: https://ibb.co/LSqVP86

    I hope everything is clear now.

    Jules

    Plugin Author Andreas Münch

    (@andreasmuench)

    Of course it does not work if you just copy the html.
    The password protection will only work if you activate it for this specific page. ??

    If you want to change the style of the form you will have to use the filter ‘the_password_form’

    Here an example of what you could do (not tested ?? )

    add_filter('the_password_form', 'doannhien_password_form');
    function doannhien_password_form ($output) {
    
        $before_form = '<div class="any-class"><h1>Enter Your VIP Club Access Code</h1>';
        $after_form ='<span>my custom stuff</span></div>';
        return $before_form . $output . $after_form ;
    }

    This needs to be added in your theme functions.php

    Plugin Author Andreas Münch

    (@andreasmuench)

    Note, I just fixed a line in the code (which for some reason has to be manually reviewed by a moderator.)

    return $before_form . $output . $after_form ;

    Thread Starter julesrsuarez

    (@julesrsuarez)

    Now, we’re on the same page! ??

    Okay, so it’s not possible to put it on another page like what I did? I just want it be added on that page so non members can view it.

    Thank you I will try to use the code.

    Jules

    Thread Starter julesrsuarez

    (@julesrsuarez)

    I tried the code: https://ibb.co/Xt0kP7h

    I’m talking about the spaces. As you notice, the box field is really close to the submit button. And they are really wide. I tried editing the CSS but no success.

    Jules

    Plugin Author Andreas Münch

    (@andreasmuench)

    Hi Jules,

    seems I finally got what you want to achieve ??

    The styling issues have to be fixed with CSS.
    Sorry, but this is unrelated to this plugin and I cannot give CSS support ??

    Maybe it solves itself when you use the correct HTML in the function.
    I just hacked in a simple example with minimal HTML markup.

    Thread Starter julesrsuarez

    (@julesrsuarez)

    Thank you, Andreas! Appreciate it.

    Jules

    Plugin Author Andreas Münch

    (@andreasmuench)

    Just if you didn′t see my latest edit:

    Maybe it solves itself when you use the correct HTML in the function.
    I just hacked in a simple example with minimal HTML markup.

    Good luck!

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Can I use it as shortcode?’ is closed to new replies.