WordPress.org

Ready to get started?Download WordPress

Forums

User Specific Content
[resolved] Add Login Prompt? (3 posts)

  1. jhanten
    Member
    Posted 1 year ago #

    Do you know of any easy way to ask a user to login if they are not that I could add to this plugin? It does everything I need, but if a user isn't logged in I need a simple way to help them correct that.

    http://wordpress.org/extend/plugins/user-specific-content/

  2. Bainternet
    Member
    Plugin Author

    Posted 1 year ago #

    Yep I do :)

    add_filter("user_specific_content_blocked","show_login_form");
    function show_login_form(){
        return wp_login_form(array('echo' =>false));
    }

    add this to your theme's functions.php

  3. pebble_garden
    Member
    Posted 1 year ago #

    Hey Bainternet,
    It works, however, it gets showed twice. I'm not sure why, and I havn't found a clue so far. When I try to only have this "No Access"-Text, it also get printed out twice on the page.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic