• fierceinpink

    (@fierceinpink)


    I saw this on some blogs and I’ve been looking all over for a plugin that will allow me to make users login or register to view the content of a post. Like I still want to title to show. But I want to post to say “You must be logged in or registered to view this content.” All the plugins I have tried make users log-in to view the whole blog, not a post. Can anyone help?

Viewing 16 replies (of 16 total)
  • My first solution is pretty easy and straight forward should use that one. But if u insist of using that plugin:

    <?php if (have_posts()): while (have_posts()): the_post() ?>
    	<h1 class="post_title"><?php the_title(); ?></h1>
    
        <?php if (function_exists(member_access_is_private)
            && member_access_is_private(get_the_ID())): ?>
    
            <?php the_content(); ?>     
    
        <?php else: ?>
    
            <p>You must be logged in or registered to view this content. If not ceiling cat will hunt u in your dreams.</p>
    
        <?endif;?>
    
    <?php endwhile; endif; ?>
Viewing 16 replies (of 16 total)

The topic ‘Login/Register to view post’ is closed to new replies.