• I’m trying to write a caption that contains square brackets, e.g.

    [caption id="attachment_3735" align="alignleft" width="640" caption="Content containing [square brackets]"]<img.... />[/caption]

    WordPress reaches the ] after brackets and treats it as the closing ] of the tag, leaving a floating "] in the code.

    Any ideas?

Viewing 1 replies (of 1 total)
  • Not sure exactly what the short code filter is applying, but you could try escaping the brackets with a slash.

    so:
    \[square brackets\]

    Like I said I didn’t look at that filter though, so I’m not sure that would work.

Viewing 1 replies (of 1 total)
  • The topic ‘How to use square brackets [] inside a caption’ is closed to new replies.