Viewing 7 replies - 1 through 7 (of 7 total)
  • 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!

    Thread Starter brandonlassiter

    (@brandonlassiter)

    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 [email protected]

    Great plugin, but yet I can’t understand how can I display the “Hello <user>! Logout” in the header and not in a specific page, and when he press on “Logout” he automatically goes to “WP-admin” or to the login page.

    Hi there,

    I like this plugin but would like to be able to redirect the user directly to the Dashboard upon successful login, is this possible?

    Thanks.

    Thread Starter brandonlassiter

    (@brandonlassiter)

    k12,

    Yes you can, however, it will require you to edit the code. Open up clw-form.php in notepad or some other word processing program and change the line that says:

    <input type=”hidden” name=”redirect_to” value=”<?php echo $_SERVER[‘REQUEST_URI’]; ?>” />

    and change what is inside value to be whatever url you want to redirect the user to

    @ brandonlassiter, thanks for this.
    But how do I get the administrator page (site/wp-admin) in a form similar to $_SERVER ?

    Never mind, found out that setting value to “wp-admin” did the trick.

    As in:

    value="wp-admin"

    Thanks for all the help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom WP Login Widget’ is closed to new replies.