Short code display problem
-
I want to display specific content to logged in users and logged out/visitors.
I could find some notable methods like adding this to the functions.php file :
add_shortcode( 'visitor', 'visitor_check_shortcode' ); function visitor_check_shortcode( $atts, $content = null ) { if ( ( !is_user_logged_in() && !is_null( $content ) ) || is_feed() ) return $content; return ''; }
add_shortcode( 'member', 'member_check_shortcode' ); function member_check_shortcode( $atts, $content = null ) { if ( is_user_logged_in() && !is_null( $content ) && !is_feed() ) return $content; return ''; }
and using the ‘visitor’and ‘member’ shortcodes to display the content. But the problem is that this method is only showing plain text like “hello world” and nothing in html. all the raw html and shortcodes are being displayed as it is in their raw look.
can anyone help me solve this problem? I want to display the html and shortcodes as they look normally on a webpage.
You can see this at my site : proxy.knolzone.com
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Short code display problem’ is closed to new replies.