Title: Shortcodes with optional {content}
Last modified: August 31, 2016

---

# Shortcodes with optional {content}

 *  Resolved [Argumentum](https://wordpress.org/support/users/argumentum0/)
 * (@argumentum0)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/shortcodes-with-optional-content/)
 * If I am not wrong, when I use `{content}` in a snippet, I cannot use only the
   opening shortcode, i.e., I am forced to use `[shortcode]Some content[/shortcode]`.
   If I use only `[shortcode]` (without the closing `[/shortcode]`), the output 
   will include a literal {content}, with braces.
 * I have some snippets with optional `{content}`, so it would be nice if I could
   use only the opening shortcode when there is no content to be added.
 * This is a suggestion for the future. It is not a priority, though, since I can
   keep using the snippet normally if I simply put a white space between the opening
   and the closing shortcodes when there is no content to be added.
 * [https://wordpress.org/plugins/post-snippets/](https://wordpress.org/plugins/post-snippets/)

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

 *  [Johan Steen](https://wordpress.org/support/users/artstorm/)
 * (@artstorm)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/shortcodes-with-optional-content/#post-7034068)
 * Thanks for the heads up. This has been added, and will be included in the next
   release.
 * Cheers,
    Johan
 *  Thread Starter [Argumentum](https://wordpress.org/support/users/argumentum0/)
 * (@argumentum0)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/shortcodes-with-optional-content/#post-7034128)
 * Great, I just tested the new version, and it’s working perfectly. Thank you!

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

The topic ‘Shortcodes with optional {content}’ is closed to new replies.

 * ![](https://ps.w.org/post-snippets/assets/icon-128x128.gif?rev=2545587)
 * [Post Snippets - Custom WordPress Code Snippets Customizer](https://wordpress.org/plugins/post-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/post-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-snippets/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Argumentum](https://wordpress.org/support/users/argumentum0/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/shortcodes-with-optional-content/#post-7034128)
 * Status: resolved