Support » Plugin: Shortcoder — Create Shortcodes for Anything » Issue with Shortcode enclosed content

  • Resolved blogvii

    (@blogvii)


    Hi @vaakash,

    There is a problem when using 2 shortcodes inside a post together: 1 Simple, 1 Enclosed content.

    Ex:

    [sc name=”myMood” misc1=”Happy”] – > Simple

    [sc name=”my_content_shortcode”]My enclosed content[/sc] -> Enclosed

    The Simple shortcode display “My mood is Happy” but the Enclosed shortcode return nothing.

    Hope you see this and check it.

    Best Regards,

    • This topic was modified 2 months ago by blogvii.
    • This topic was modified 2 months ago by blogvii.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author vaakash

    (@vaakash)

    Hi @blogvii,

    Thanks for using Shortcoder.

    Unfortunately, shortcode API itself has certain limitations like you have mentioned. Please find more details here – https://codex.wordpress.org/Shortcode_API#Unclosed_Shortcodes

    I would suggest to try closing the first shortcode (i.e adding [/sc])

    Thanks,
    Aakash

    Thread Starter blogvii

    (@blogvii)

    Hi @vaakash ,

    I would suggest a solution for this. Creating a new post type: “Shortcoder Unclosed”.

    This post type inherits the functionality of “Shortcoder”. The new shortcode name: [scu name=”my_content_shortcode”]My enclosed content[/scu]

    Best Regards,

    Plugin Author vaakash

    (@vaakash)

    Hi @blogvii,

    Thanks for the suggestion. But I would prefer keeping the shortcode same and simple. Since most users do not end up with such a scenario it is preferred to manually close the shortcode as and when needed.

    I’ll mark this thread os resolved. If you have any more issue related to this, please do reply back.

    Thanks,
    Aakash

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