Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • Tom DeSimone
    Participant

    I’m trying to use the “shortcode enclosed content” parameter but am having trouble with it. What is the correct tag to close the shortcode? Am I understanding this parameter correctly?

    [sc name="example"]This is shortcode enclosed content.[/shortcode]

    Thank you for your help.

    Hi Tom,

    You are almost correct. You have to close the shortcode with [/sc]

    Something like below

    [sc name="example"]This is shortcode enclosed content.[/sc]

    Thanks,
    Aakash

    Tom DeSimone
    Participant

    Thank you for your help! I am now experiencing a second issue. When I use a shortcode with enclosed content on the same page as another Shortcoder shortcode, the shortcode with enclosed content does not display. Is there an easy way to fix this?

    Example:

    [sc name="example1"]
    [sc name="example2"]This is shortcode enclosed content[/sc]

    Displays:

    Example1 text.

    Tom DeSimone
    Participant

    I just realized that I can fix this by adding [/sc] to the other shortcodes on the page, which is a workable solution for me. Thank you.

    Yes Tom, Thats a limitation with WordPress shortcode itself.

    Please refer – https://codex.wordpress.org/Shortcode_API#Unclosed_Shortcodes

    Thanks,
    Aakash

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Subscribe for updates

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter