• Resolved dlx

    (@deeluuxe)


    Hello!

    Is it possible to add a protection to all pages without adding the shortcode manualy on every page? I would like to see who enters my site and restrict some visitors. I′m looking for an easy solution without registration – so your plugin looks great for this.

    Maybe a code that adds your shortcode on every page in functions.php could do the magic. Or is there a setting in your plugin to automaticaly restrict all pages?

    Best regards!
    Jean

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WP Shuffle

    (@wpshuffle)

    Hello Jean,

    Thank you for writing to us. Locking all pages through our popup locker is available in the PRO version but still if you want to lock all the pages content then please add the below code in your theme’s functions.php file.

    function stul_local_all_pages($content) {
    	if (is_page() && !is_admin()) {
    		return '[subscribe_to_unlock_form]' . $content . '[/subscribe_to_unlock_form]';
    	} else {
    		return $content;
    	}
    }
    
    add_filter('the_content', 'stul_local_all_pages');

    Please note that the above code will lock the content of the pages but not the posts. If you want to lock all the content not distinguishing page or post then please add below code.

    function stul_local_all_pages($content) {
    	
    		return '[subscribe_to_unlock_form]' . $content . '[/subscribe_to_unlock_form]';
    	
    }
    
    add_filter('the_content', 'stul_local_all_pages');


    Thanks.

    Plugin Author WP Shuffle

    (@wpshuffle)

    Hello @deeluuxe

    Any updates on this? Did you try our provided code?

    Please inform us

    Thanks.

    Thread Starter dlx

    (@deeluuxe)

    Hello @wpshuffle

    thanks for your quick reply! I was a bit quicker and added this code to filter some pages from protection:

    // protect all content with subscribe to unlock plugin
    function protect_the_content( $content ) {
    if (!is_page(array(123,124))) {
    $custom_content = ‘

    [subscribe_to_unlock_form]’;
    $custom_content .= $content;
    $custom_content .= ‘[/subscribe_to_unlock_form]

    ‘;
    return $custom_content;
    } else {
    return $content;
    }
    }
    add_filter( ‘the_content’, ‘protect_the_content’ );

    Works great! But I would like to support you and buy the PRO version.
    Just one question: Does the PRO version track the last access (by cookie or link from the e-mail-link)? This would be perfect.

    Best regards,
    Jean

    Plugin Author WP Shuffle

    (@wpshuffle)

    Hello @jean,

    Thank you for your reply. We are a bit unclear regarding tracking the last access. Can you please clarify us a bit more clearly?

    Regarding supporting, we are in really need of some good reviews for our plugin. Can you please give us one here ??

    Thanks.

    Thread Starter dlx

    (@deeluuxe)

    Hello @wpshuffle

    by “tracking the last access” I mean that the subscriber list should contain an additional column with date and time. Since the unlock-key is stored in the coockie “stul_unlock_key”, the date/time could be updated every time the corresponding user is on the website.

    Best regards
    Jan

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Protect all pages (private website)’ is closed to new replies.