WordPress.org

Forums

Custom WP Login Widget
[resolved] how do you use the shortcode to block access to a page until the us (4 posts)

  1. janetpdxor
    Member
    Posted 2 years ago #

    Hi!
    I've installed the plugin and activated it. Then, I pasted the shortcode [clw_add_form] into the top of a page that I wanted blocked from users that are not logged in.

    The form appears, but so does the rest of the page...

    How can I use this plugin to make login only access to pages or posts?

    I am a new user, so if at all possible, please respond at a novice level.

    Many Thanks!

    http://wordpress.org/extend/plugins/custom-wp-login-widget/

  2. brandonlassiter
    Member
    Plugin Author

    Posted 2 years ago #

    I am not quite sure I understand. Are you trying to make it so that people cannot see your page/post unless they are logged in? If so, that is not what this plugin does. It is designed to place the login form somewhere on your site instead of using the default wordpress login.

    You can, however, insert some coding into your template files to get the desired result.

    <?php
    if ( is_user_logged_in() ) {
    ?>
    Whatever content you want only logged in users to see
    <?php
    } else {
    ?>
    What you want them to see if they are not logged in
    <?php
    }
    ?>

    If you are not comfortable with PHP I wouldnt recommend trying to add this code because there is a very likely chance that you will break your site. A good plugin that can do that however is s2Member. It is not free though. Do you want your entire site to be hidden if the user is not logged in? If so I have a workaround code I can help you out with. Feel free to email me at brandon@brandonlassiter.com

  3. brandonlassiter
    Member
    Plugin Author

    Posted 2 years ago #

    Since I have not heard back and I believe the answer provided is correct I am closing this topic. If you have any further questions feel free to contact me.

  4. janetpdxor
    Member
    Posted 2 years ago #

    Sorry, I replied via email not the forum. I was able to use your Custom WP Login Widget in combination with User Access Manager to create subscriber only accessible posts and pages. Thanks for your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom WP Login Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic