Password on a template
-
I found this thread, which gets some of my issue addressed.
https://ww.wp.xz.cn/support/topic/function-in-3-1-8-ps_conditionalis_password_valid/I have a page template and I want to password protect on the template. I have set this the following below. I see the password form, but when I enter in the password of 123, I get told ‘invalid password’. Am I missing something?
<?php
$args = array( 'password' => 123 ); if ( passster\PS_Conditional::is_valid( $args ) ) { while ( have_posts() ): the_post(); the_content(); endwhile; } else { // If not logged in, show the Login Form ob_start(); the_content(); $content = ob_get_clean(); $shortcode = '[passster password="123"]' . $content . '[/passster]'; echo do_shortcode( $shortcode ); } // End Password Protection?>
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Password on a template’ is closed to new replies.