Title: shortcode / shortcode_exists help
Last modified: August 31, 2016

---

# shortcode / shortcode_exists help

 *  Resolved [Jay](https://wordpress.org/support/users/the_circle_pit/)
 * (@the_circle_pit)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-shortcode_exists-help/)
 * Hello,
 * I want to use the shortcode_exists() function to check if the shortcode [slider
   id=”1″] exists. I have a feeling the space is messing things up, but am not sure.
 * Current Code
 *     ```
       if (shortcode_exists( 'slider id="1"' )) {
           echo do_shortcode( '[slider id="1"]' );
       }
       ```
   
 * I have also tried…
 *     ```
       shortcode_exists( '[slider id="1"]' )
       ```
   
 * Thank you for any help.

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

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-shortcode_exists-help/#post-7016201)
 * The `shortcode_exists()` function only takes the shortcode name, no other attributes
   or characters. You’d only want to use ‘slider’ for your site. In your case you’d
   use it like this:
 *     ```
       if (shortcode_exists( 'slider' )) {
           echo do_shortcode( '[slider id="1"]' );
       }
       ```
   
 *  Thread Starter [Jay](https://wordpress.org/support/users/the_circle_pit/)
 * (@the_circle_pit)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-shortcode_exists-help/#post-7016203)
 * You the man catacaustic.
 * Thank you.

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

The topic ‘shortcode / shortcode_exists help’ is closed to new replies.

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Jay](https://wordpress.org/support/users/the_circle_pit/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/shortcode-shortcode_exists-help/#post-7016203)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
