Title: [else] shortcode not working properly
Last modified: August 31, 2016

---

# [else] shortcode not working properly

 *  [JennaOw](https://wordpress.org/support/users/jennaow/)
 * (@jennaow)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/else-shortcode-not-working-properly/)
 * Hello,
 * I’m trying to follow the code shown here on restricting content after the <!–
   more–> tag: [http://s2member.com/kb-article/restricting-content-after-the-tag/](http://s2member.com/kb-article/restricting-content-after-the-tag/)
 * I realize I’m supposed to nest [else] in the article, but it appears I’m not 
   supposed to do this with an underscore. So I am simply indenting the [else], 
   but it is not doing the command it is supposed to be doing. On a post, [else]
   is actually showing up within the content, so it’s obviously not being read.
 * Does anyone have any tips on using the [else] shortcode?
 * I have tried nesting the text I want to be visible above the [else] shortcode,
   but maybe I have not done this properly.
 * Perhaps my issue is I’m not sure how to nest properly within the WordPress text
   editor.
 * Can anyone help, please?
 * [https://wordpress.org/plugins/s2member/](https://wordpress.org/plugins/s2member/)

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

 *  [KTS915](https://wordpress.org/support/users/kts915/)
 * (@kts915)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/else-shortcode-not-working-properly/#post-6952627)
 * > it appears I’m not supposed to do this with an underscore.
 * Actually, you can do it with an underscore. See [http://s2member.com/kb-article/s2if-simple-shortcode-conditionals/](http://s2member.com/kb-article/s2if-simple-shortcode-conditionals/)
   But it shouldn’t be necessary in this case.
 * I don’t think that whether the `[else]` is indented or not is supposed to make
   any difference. However, I’ve noticed that adding spaces does sometimes cause
   problems, so I’d suggest first trying it without any indent. If it still doesn’t
   work, I’d try moving the `[else]` to the end of the previous line, or even making
   the whole text one line.
 * The point is that, if the `[else]` is printing as written, then something must
   have turned off the original `[s2If current_user_can(access_s2member_level1)]`
   condition. If neither of the above suggestions work, I’d just check that your
   shortcode doesn’t end with a `/`
 *  [krumch](https://wordpress.org/support/users/krumch/)
 * (@krumch)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/else-shortcode-not-working-properly/#post-6952716)
 * [@jennaow](https://wordpress.org/support/users/jennaow/): The [else] works with
   Pro version only. To do same in free one you can use two checks:
 *     ```
       [s2If something()]
       Show if YES.
       [/s2If]
       [s2If !something()]
       Show if NO.
       [/s2If]
       ```
   
 * Works great for me, everywhere.

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

The topic ‘[else] shortcode not working properly’ is closed to new replies.

 * ![](https://ps.w.org/s2member/assets/icon-256x256.png?rev=980067)
 * [s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions](https://wordpress.org/plugins/s2member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/s2member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/s2member/)
 * [Active Topics](https://wordpress.org/support/plugin/s2member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/s2member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/s2member/reviews/)

## Tags

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

 * 2 replies
 * 3 participants
 * Last reply from: [krumch](https://wordpress.org/support/users/krumch/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/else-shortcode-not-working-properly/#post-6952716)
 * Status: not resolved