WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: User Specific Content] logged in and logged out shortcode

[Resolved] [Plugin: User Specific Content] logged in and logged out shortcode

Viewing 1 replies (of 1 total)
  • Plugin Author Bainternet

    @bainternet

    There is none but here is a quick one for you:

    add_shortcode('USER','show_user_content');
    add_shortcode('GUEST','show_guest_content');
    
    function show_user_content($atts,$content = null){
    	if (!is_user_logged_in()){
    		return "this is for looged in users only";
    	}
    	return $content;
    }
    
    function show_guest_content($atts,$content){
    	if (!is_user_logged_in()){
    		return $content;
    	}
    }
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: User Specific Content] logged in and logged out shortcode’ is closed to new replies.