[Resuelto] types field shortcode not working inside a conditional
This support ticket is created hace 4 años, 4 meses. 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I am trying to:
Display a types field inside a conditional statement in a content template.
Link to a page where the issue can be seen: hidden link
You may need to log in to see the problem as it's a development site.
I expected to see: hidden link
Armenian
Instead, I got:
[types field='education-pack-0-6' output='raw'][/types]
[types field='country-language-name'][/types]
Strangely, if I place the URL shortcode in like: <a href="[types field='education-pack-0-6' output='raw'][/types]">link</a> the link URL comes out as it should.
So testing with this code in the content tamplate:
The output is:
[php]
Outside conditional hidden link
test
Armenian
Inside conditional
[types field='education-pack-0-6' output='raw'][/types]
test
[types field='country-language-name'][/types]
[php]
And both of the test links have the fully rendered URL in the link.
We have been experiencing quite a few issues with Divi lately. To check if the issue is coming from divi I would recommend that you temporarily swap the theme to one of the wordpress default themes and let me know if the issue is still present.
I fixed it by putting the contents of the conditional into a separate content template and embedding the shortcode to the new content template in the conditional.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.