Skip Navigation

[Resolved] Shortcodes inside conditionals

This support ticket is created 2 years, 11 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 6 replies, has 2 voices.

Last updated by luisP-6 2 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#2320703

Hi,

I'm trying to use this code:

[wpv-conditional if="( $(wpcf-links) ne '' )" index="0"][types field='links' output='raw' index='0' separator=', '][/types][/wpv-conditional]

Instead of show "links" field value, on the frontend it shows this: [types field='links' output='raw' index='0' separator=', '][/types]

How could I use types shortcodes inside a conditional?

Thank you

#2320825

Shane
Supporter

Languages: English (English )

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

Hi Luis,

Thank you for getting in touch.

Can you let me know the context under which you're using this ? Are you using a content template to display the contents of your post?

Is the conditional added to that content template.

Please let me know.
Thanks,
Shane

#2320827

Hi,

I'm using a content template from Visual Composer.

Thank you Shane!

#2320931

Shane
Supporter

Languages: English (English )

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

Hi Luis,

Would you mind allowing me to have admin access to the website so that I can have a more detailed look at this for you ?

Please where applicable please provide me with a link to an example page where I can see the issue.

I've enabled the private fields for your next response.

Thanks,
Shane

#2322729

Hi,

I solved this problem. When I try it with Toolset content templates, it works fine.

If I put same code inside Visual Composer page, I see shortcodes instead of field values.

Any idea how to fix it in Visual Composer? By default your plugin changes [ and ] {!{ and }!}, but any of them are working fine. I see shortcodes in both cases.

Thank you!

#2323035

Shane
Supporter

Languages: English (English )

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

Hi Luis,

Perhaps you can use our Toolset Content templates and then using the visual builder edit the content templates.

There should be an option on the content template to edit it with Visual Composer. Are you using the Block editor on the Content template?

If so then you will perhaps need to enable the Classic Editor. Under Toolset -> Settings scroll to Editing experience and select the 3rd option. From there just select Classic Editor for Editor to use for Content Templates.

Thanks,
Shane

#2325747

My issue is resolved now. Thank you!