Title: Short code display problem
Last modified: August 20, 2016

---

# Short code display problem

 *  [aravindbachu](https://wordpress.org/support/users/aravindbachu/)
 * (@aravindbachu)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/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)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/short-code-display-problem/#post-3455791)
 * try:
 *     ```
       return apply_filters('the_content',$content);
       ```
   
 *  Thread Starter [aravindbachu](https://wordpress.org/support/users/aravindbachu/)
 * (@aravindbachu)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/short-code-display-problem/#post-3455793)
 * where? by replacing return $content;
 * or the return ”; ??
 *  Thread Starter [aravindbachu](https://wordpress.org/support/users/aravindbachu/)
 * (@aravindbachu)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/short-code-display-problem/#post-3455797)
 * thanks a lot , alchymyth…it worked like a charm! 😀

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Short code display problem’ is closed to new replies.

## Tags

 * [member](https://wordpress.org/support/topic-tag/member/)
 * [text](https://wordpress.org/support/topic-tag/text/)
 * [visitor](https://wordpress.org/support/topic-tag/visitor/)

 * 3 replies
 * 2 participants
 * Last reply from: [aravindbachu](https://wordpress.org/support/users/aravindbachu/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/short-code-display-problem/#post-3455797)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
