1

Suppose I have a [list] shortcode. I want to have a post explaining how to use shortcodes (docs for my theme). How can I have a header like

[list type="arrow"] Shortcode Tag

Currently wordpress will mess it up converting [list type="arrow"] into invalid HTML

4
  • 1
    Sidenote: shortcode madness: replacing basic HTML Commented May 17, 2011 at 5:59
  • possible duplicate of how to show the syntaxis of a shortcode Commented May 17, 2011 at 7:10
  • I think the argument is valid. I think one of the reasons why shortcode is simpler for non developers is its better documented in themes and more visible in the editors. WordPress shld add a hook for its editors to allow theme developers to add CSS Classes into the WordPress editor for users to select/view Commented May 17, 2011 at 7:35
  • This is already possible, see my answer with a complete example. Commented May 17, 2011 at 14:22

1 Answer 1

5

This is very similar to this question where Jan had given us all a great lesson :)

just use double brackets, WordPress will not execute the shortcode but just display it with single brackets.

so your header would be [[list type="arrow"]]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.