Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Allan Lavridsen
    Participant

    Here’s the thing. I would for users to be able to use this long shortcode from another plugin

    [stock_market_widget type="card" template="basic" color="#5679FF" assets="%variable%" api="yf"]

    My idea was to use shortcoder to simplify it into

    [SC name="stock" stockcode="%variable%" ] or something similar, removing design options

    So it is easier for users..

    Hope it makes sense Can you please give me hint on how to do this ? (not a programmer)

    regards Allan

    Hi Allan,

    Yes you can do that using Shortcoder.

    Shortcoder has a feature called “custom parameters” using that you can have variables inside shortcode content using double percentages. Refer below doc for examples.

    Custom parameters

    So in your case, you can do something like this.

    In shortcode content:

    [stock_market_widget type="card" template="basic" color="#5679FF" assets="%%variable%%" api="yf"]

    In post:

    [SC name="stock" variable="MY VALUE FOR ASSETS" ]

    Thanks,
    Aakash

Viewing 2 posts - 1 through 2 (of 2 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