Title: Brackets within shortcodes
Last modified: August 30, 2016

---

# Brackets within shortcodes

 *  Resolved [Grendelica](https://wordpress.org/support/users/grendelica/)
 * (@grendelica)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/brackets-within-shortcodes/)
 * Hi,
    I am using the shortcodes add-on. I have a custom field name that has two
   pairs of square brackets: “name[name][name]”. Of course the shortcode breaks,
   even if I write the name within quotes. I’ve also tried to write the HTML code
   for the brackets and it does not work either. Is there any way around this?
 * Thank you
 * [https://wordpress.org/plugins/postie/](https://wordpress.org/plugins/postie/)

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

 *  Plugin Author [Wayne Allen](https://wordpress.org/support/users/wayneallen-1/)
 * (@wayneallen-1)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/brackets-within-shortcodes/#post-6667546)
 * Can you gave me an example of how you use the shortcode.
 *  Thread Starter [Grendelica](https://wordpress.org/support/users/grendelica/)
 * (@grendelica)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/brackets-within-shortcodes/#post-6667603)
 * Of course
 * [pcustom name=”fieldname[name][url]” value=”[http://www.mywebsite.com/category/file.mp3″%5D](http://www.mywebsite.com/category/file.mp3″%5D)
 * I have written the above shortcode in the email body. Every other shortcode I
   have used works except this one, that “breaks” after the first brackets closes,
   so the output I find in my post is this text
 * [url]” value=”[http://www.mywebsite.com/category/file.mp3″%5D](http://www.mywebsite.com/category/file.mp3″%5D)
 * wether I use the “” or not for the custom field name.
 *  Thread Starter [Grendelica](https://wordpress.org/support/users/grendelica/)
 * (@grendelica)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/brackets-within-shortcodes/#post-6667605)
 * Yes, sure!
 * This is the content of the post I am sending
 * [pdate “Nov 15, 2015”]
    [pstatus future] [pcustom name=”fieldname[name][url]”
   value=”[http://www.mywebsite.com/url/file.mp3″%5D](http://www.mywebsite.com/url/file.mp3″%5D)
 * The shortcode “breaks” after the first bracket closes; the output I have in my
   post is this
 * [url]” value=”[http://www.mywebsite.com/url/file.mp3″%5D](http://www.mywebsite.com/url/file.mp3″%5D)
 * whether I use quotes to enclose the field name or not.
 *  Plugin Author [Wayne Allen](https://wordpress.org/support/users/wayneallen-1/)
 * (@wayneallen-1)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/brackets-within-shortcodes/#post-6667608)
 * Looks like you’re running into a WordPress limitation. See [https://codex.wordpress.org/Shortcode_API#Square_Brackets](https://codex.wordpress.org/Shortcode_API#Square_Brackets)
 * What plugin are you trying to work with? I suspect that [pcustom] won’t really
   work even if the limitation wasn’t there since [pcustom] replaces the entire 
   value and you are trying to update an element in the array.
 * Without the rest of the elements I suspect the plugin won’t work correctly.
 *  Thread Starter [Grendelica](https://wordpress.org/support/users/grendelica/)
 * (@grendelica)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/brackets-within-shortcodes/#post-6667609)
 * Yes, thanks! I’ve seen the codex but I am afraid you’re right and it wouldn’t
   work anyway.
 * I am trying to work with PowerPress, which is a podcasting plugin, to see if 
   I could add the mp3 url to the post in the correct field.
 *  Plugin Author [Wayne Allen](https://wordpress.org/support/users/wayneallen-1/)
 * (@wayneallen-1)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/brackets-within-shortcodes/#post-6667610)
 * A custom shortcode is the way to go I think. [http://postieplugin.com/adding-your-own-postie-shortcodes/](http://postieplugin.com/adding-your-own-postie-shortcodes/)

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

The topic ‘Brackets within shortcodes’ is closed to new replies.

 * ![](https://ps.w.org/postie/assets/icon-256x256.png?rev=970083)
 * [Postie](https://wordpress.org/plugins/postie/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/postie/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/postie/)
 * [Active Topics](https://wordpress.org/support/plugin/postie/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/postie/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/postie/reviews/)

## Tags

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

 * 6 replies
 * 2 participants
 * Last reply from: [Wayne Allen](https://wordpress.org/support/users/wayneallen-1/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/brackets-within-shortcodes/#post-6667610)
 * Status: resolved