Support » Plugins » Members only sections

  • Looking for a flawless or semi flawless plugin that will enable a members only sections of a wordpress site?
    Looking for something that will turn it into a pay per view site.. Any one know of such a plugin?

Viewing 15 replies - 1 through 15 (of 130 total)
  • Write it yourself.
    Create a template, and assign this template to the pages you want to make accessible only for members.

    I did it by copying the index.php file, called it index_secure.php and added a `
    Template Name: For Registered Users only
    at the top. Then, where everything is being displayed, meaning before the loop, I added `
    <?php if (is_user_logged_in()) { ?>`
    so that in the else part I could write “sorry, you need to be logged in”.

    Hope this helps.

    Okay so you take the frame out of index.php and add that code for whereit needs to go and you can make a sorta VIP page or even area out of it?
    I checked out your site I like the look, but don’t know what it

    Do you implement the users page with the page template selection?

    Okay so does this go into the template or theme?

    okay I made it and when I published the page it didn’t show up. So it is hiding. No what do I do to put it on the page and make it so people have to sign up to get on there?

    The code that mores gave you should be used in a separate template file (called e.g. members.php) that is uploaded to your server. Then when you create the page itself with wordpress, the page template for this page will be members.php (or whatever you decide to name it)

    Might be worth doing a search on the forums for a possible plugin (no promises here) but I know this isn’t the first time that someone has asked for it 🙂

    well the code hid the page.. I was just wondering how to you access it once it is hiding? where and how?

    If you use WP e-Commerce you can use the members only module to lock pages and posts to members only.

    We’re actually doing a chunk of work on this at the moment. We are building a members only token system – so if you are a member to a site and you want to view members only content (i.e. video file) it will cost you one token per video you watch.



    Thanks Dan I will try that..

    @machracer: You could probably insert something outside the ‘if user logged in’ part to show the login form or a message to say ‘registration needed’ or ‘you need to be logged in’?

    What do you mean mosey?

    Mores mentioned this already in his post

    so that in the else part I could write “sorry, you need to be logged in”.

    I’m not familiar with PHP, but apparently if you put:

    IF (this condition) A happens

    ELSE B happens.

    So in your case, where users aren’t logged in, the instructions are B. And you might put something like ‘sorry you need to be loggedin’ as mores suggested or a link to the login page.

    yeah, and rught now I am looking for a plugin that will lock a page. and another put in a sign in link on it.

    I’m not sure how best to explain this. With the code that mores provided, it is possible to NOT use a plugin to create member-only sections.

    How does it work?
    I’m presuming you have an understanding of how a page template works, and bearing in mind I have not tested this code: This particular part <?php if (is_user_logged_in()) { ?> sets a condition:

    If the user is logged, they can see the content after this code and before the closing tag.


    <?php if (is_user_logged_in()) { ?>
    Oranges and lemons
    <? } ?>

    If the user is logged in, they can see ‘Oranges and lemons’. If they’re not, they can’t and the page is blank.

    But let’s presume you want to inform the users who aren’t logged in that they have to login to see this content.

    So this is where the else comes in.

    <?php if (is_user_logged_in()) { ?>
    Oranges and lemons
    <? } else { ?>
    You must be logged in!
    <? } ?>

    Anyone who isn’t logged in will see ‘You must be logged in!’ And you can easily put a link to the login page.

    I’m not quite sure how else to explain this, but this sort of explanation worked for me (and I’m a slow learner) so hopefully you’ll find it helpful too.

    Yeah it is.. I am going to do my best to contact you.. or if I cant can you contact me? You would be so helpful if we talked more. I am helping out a friend and I am stuck.

Viewing 15 replies - 1 through 15 (of 130 total)
  • The topic ‘Members only sections’ is closed to new replies.