Support » Plugin: WP-Members: Membership Framework » Not able to restrict pages

  • Hi,

    I’ve installed the wp-members plugin, block pages by default is unchecked and on my single page i selected the option ‘Block this page’.

    Show excerpts is also unchecked. But still the entire page content is being shown even when I’m logged out.

    The page I am trying to blog uses the default page template. Is there something that I have to add here to make it work?

    I am currently developing the wordpress theme by myself and using this plugin. I do not know what i’m missing.

    Please help.

    Thanks!

    Regards,

    Jogi Nayak

    http://wordpress.org/plugins/wp-members/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    Are you using any of the wp-members shortcodes in the page you are trying to block?

    No I’m not.

    Hi Chad,

    Any idea yet what could be going wrong here? Is there any other details you want me to give you ?

    Thanks.

    Plugin Author Chad Butler

    (@cbutlerjr)

    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.

    Plugin Author Chad Butler

    (@cbutlerjr)

    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 } ?>

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Not able to restrict pages’ is closed to new replies.