Special post and pages for members only

  • 0 comments
  • No Comments
    Posted 27 Mar 2011 in WordPress Plugins

    If you had blog walking into some WordPress designer blogs that selling their themes using membership. I think you should visit this plugin : member access. It is a free WordPress plugin created by Chris Abernethy that already posted in wordpress.org.

    The installation was just like other WordPress plugins and you need to setup the plugin as shown at the documentation that already shared by Chris in WordPress.org at the screenshot chapter. As a WordPress themes designer like me, I need to make some special code in my themes that will support this member access plugin. So, I have to separate some code that will be seen by members or public. Here it is some sample code that might useful to learn.

    <?php if (have_posts()): while (have_posts()): the_post() ?>
        <?php if (function_exists(member_access_is_private)
            && member_access_is_private(get_the_ID())): ?>
        <div>
        <?endif;?>
            <h1></h1>
            <?php the_content(); ?>
        <?php if (function_exists(member_access_is_private)
            && member_access_is_private(get_the_ID())): ?>
        </div>
        <?endif;?>
    <?php endwhile; endif; ?>

    member_access_is_private will separate the content which one is for members only and the other is for public. So, you can maintain your post to choose what should public see, because members usually could see all the public and member privileged.

    What about the payment gateway ? This plugin only support member access only. If you want more you could contact Chris and ask for his help to create it, or if you the instant way you could bought a premium membership plugin and of course you will spend more money to buy this plugin.


    Add Your Comment

    Enter your comment*:

    * Required fields