I have create a simple text-based shortcode. I want to reuse the shortcode on several pages and pass in different custom parameters. Here is shortcode text: https://ibb.co/LkyqJn8
Here is the page that calls the shortcode: https://ibb.co/Sn2XQwB
Here is the resulting output: https://ibb.co/zxNvgg7
What am I missing?
WordPress’s shortcode itself has a limitation where it does not work well with nested shortcodes. See link below .
In you case things are considered as nested because [sc name="judging_guidelines] is seen back to back.
So wordpress thinks that the 2nd shortcode is nested inside the 1st shortcode.
I would recommend closing the first shortcode with [/sc] or have only one shortcode at the first place.
I closed out the first shortcode as you suggested and this time the second shortcode accepted the first custom parameter, but not the second one. The second custom parameter showed up as blank.
Please avoid formatting inside parameter value. That will break the shortcode syntax. I see you have bold text for the 2nd parameter.
To get it right easily, please switch to “text” editor while editing the post and then insert/edit the shortcode.
If you want to bold the text, please do the formatting in the shortcode content.
In the end just make sure the syntax of the shortcode is like in the link below. https://www.aakashweb.com/docs/shortcoder/getting-started/
I have it working now, thanks!
Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam.