• Resolved mythusmage

    (@mythusmage)


    Where are they explained? How do you add a parameter to a shortcode? I’m not going to assume anything, that’s why I ask.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi mythusmage,

    A parameter to the shortcode goes inbetween the shortcode word and the closing square bracket.

    So if you have a shortcode called “shortcode”

    [shortcode]

    And you want to add a parameter x to equal 1, you’d add it here:-

    [shortcode x="1"]

    For shortcodes that wrap text, you can do the following:-

    [shortcode x="1"]Content[/shortcode]

    It’d be handy to know what you actually wish to do shortcode wise. Do you have an example of what you are trying to do? I’ll aim to help 🙂

    Its simple

    Refer this page

    https://codex.ww.wp.xz.cn/Shortcode_API

    Thread Starter mythusmage

    (@mythusmage)

    Rhys, Thank you for your assistance. To answer your question, I’m using the show post plug in from Weaver themes. The specific shortcode I would like to use is; [show post cols=2]. There are others, but that’s one I’d really like to use. Now, were I to need to end the columns at some point is closing tag needed.

    a2z, I looked, it aint there. At least not any where that’s easy to find.

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

The topic ‘Shortcode Parameters’ is closed to new replies.