Skip Navigation

[Resolved] Passing parameter to wpv-post-body

This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 4 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#1719837

Hello,

I'm trying to pass a parameter to the wpv-post-body shortcode. The use case i want to replicate is to set small variants in my views and not having to code a content template multiple times. For example now i'm asking this because i want to set a style variant in a card. Now it's 50 lines of code, but i think it will be growing a lot more. Is there a way to bypass or hardcode the shortcode to accept parameters? my fastest workaround now is to create "n" times new templates for each new variant, to wrap the template. Is not the most elegant solution but it works.

Is there any documentation that you are following?
I saw an old post that the content template shortcode doesnt accept parameters.

Thank you very much

#1719965

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Martin,

Unfortunately no you are not able to pass a custom parameter through our wpv-post-body shortcode.

Only the parameters in the link below are acceptable parameters.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/

Thanks,
Shane