I want, that only logged in user can see the page hidden link
I followed the membership site tutorial
If you type the URL hidden link you can enter the page. But i told the Plug in to show the Page only to Logged in users.
Even if you log in and then log out and the click the browser "go back" - Button the side is appering.
hidden link
Hi,
Welcome to Toolset support and I'd be happy to assist.
I tried to view the page that you've mentioned, but the website is showing a "There was a critical bug on your website." error.
When an error like this is shown WordPress usually sends in some details about the error in an email to the WordPress admin. You can look for those errors or warnings or turn on WordPress debugging to investigate more into this error:
https://wordpress.org/support/article/debugging-in-wordpress/
Once the website is back online, you're welcome to share temporary admin login details in reply to this message, so that I can see why the members-only page is showing to guests (non-logged in visitors).
Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.
regards,
Waqar
That was just shortly in debug mode. now its running.
Thank you for sharing the admin access and the post group restriction seems to be set up properly.
To investigate why this page is still showing to the guests, I'll need to perform some tests on your website's clone.
The Duplicator plugin is already installed on the website, so do I have your permission to download a clone/snapshot of the website?
( ref: https://toolset.com/faq/provide-supporters-copy-site/)
This will help in troubleshooting this without affecting the actual website.
Thank you for the permission.
I've downloaded the clone and currently doing some troubleshooting on my server and will share my findings as soon as it completes.
Thank you for your patience.
Thank you for waiting while I performed some testing and research.
During the investigation, I was able to reproduce this behavior on a test website too.
When a post/page using Enfold theme's Avia builder is restricted by Access Post Group, its regular content and not the assigned content template is shown to the users who are not allowed.
I've shared these findings with the concerned team for further review and will keep you updated through this ticket.
For now, you can use follow these steps as a workaround:
1. In your child theme's folder "enfold-child", you can add a new file named "template-login.php" with the following code:
<?php
/*
Template Name: Login Form
*/
if ( !defined('ABSPATH') ){ die(); }
/*
* A blank Template that allows you to build landing pages, coming soon pages etc
*/
global $avia_config, $wp_query;
/*
* get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
*/
get_header();
/**
* @used_by enfold\config-wpml\config.php 10
* @since 4.5.1
*/
do_action( 'ava_page_template_after_header' );
if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title();
do_action( 'ava_after_main_title' );
?>
<div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
<div class='container'>
<main class='template-page content <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content','post_type'=>'page'));?>>
<?php
echo render_view_template( 1502, get_the_ID() );
?>
<!--end content-->
</main>
<?php
//get the sidebar
$avia_config['currently_viewing'] = 'page';
get_sidebar();
?>
</div><!--end container-->
</div><!-- close default .container_wrap element -->
<?php
get_footer();
The above page template will show the content from the content template "Login Form".
2. Please go to WP Admin -> Toolset -> Access Control -> Post Groups and for the group "Logged-in users only", select this new page template "Login Form" for the guests.
( screenshot: hidden link )
I hope this helps and please let me know if you need any further assistance around this.