Are you using any of the wp-members shortcodes in the page you are trying to block?
Hi Chad,
Any idea yet what could be going wrong here? Is there any other details you want me to give you ?
Thanks.
The plugin by default only handles page and post post types. If you are using a custom post type, there are customizations for allowing those to be blocked, but the plugin won’t do it by default.
You said you are developing this theme yourself. Does the theme make proper use of the Loop? The plugin only handles content that is in the $content variable within the Loop.
If it is a page (not a post) and you have the plugin set to display content excerpts in the plugin options, you MUST use the ‘more’ tag. If you don’t, the entire page content is going to be the excerpt.
Hi Chad,
Thanks for the reply. I am not using a custom page type.
This is the content of my page.php and all pages use this.
<?php
/*
Template Name: Single Page
*/
?>
<?php get_header() ?>
<div id=”main”>
<div id=”general” class=”m2 right”>
<h2 class=”dotted”><?php the_title(); ?></h2>
<div class=”t2 user-edit”>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
</div>
</div>
</div>
<?php get_footer() ?>
Do you think I’m missing something here ?
Thanks.
That looks valid. So I would take a look at the last element I mentioned above:
If it is a page (not a post) and you have the plugin set to display content excerpts in the plugin options, you MUST use the ‘more’ tag. If you don’t, the entire page content is going to be the excerpt.
Yes, I have tried that but it doesn’t seem to work. I have unchecked ” Shows excerpted content above the login/registration on both Posts and Pages” . I also checked it and added the more tag but still in vain. Please let me know if you can think of anywhere else I could have gone wrong. Thanks.
Hey chad,
Can you tell me the php code to check if the user is logged in ? May be I can add this myself to the page and restrict it. I guess this would solve all my problems since everything else seems to be working alright !
Thanks.
Here’s the code to check if the user is logged in.
<?php if ( is_user_logged_in() ) { ?>
//add whatever you want here
<?php } ?>