Tell us what you are trying to do?
use conditional output to display custom post type custom fields.
setup:
I am using elementor
I am using elementor templates
VIEW name is "Resource Options"
my custom post type is RESOURCES
my custom fields for RESOURCES are:
Check to Display Redirect Link (checkbox, checked value of 1, not checked value of 0)
Redirect Link (string)
Check to Display Download Button (checkbox, checked value of 1, not checked value of 0)
Resource Download Link (string)
here is my conditional statement:
(IF redirect link box is checked then display the redirect link)
<p>
[wpv-conditional if="( $(wpcf-check-to-display-redirect-link) eq '1' )" debug="true"]
[types field='check-to-display-redirect-link' output='raw' show_name='true' item='$current_page'][/types]<br>
[types field='redirect-link' item='$current_page'][/types]
[/wpv-conditional]
</p>
(IF download link box is checked then display the redirect link)
<p>
[wpv-conditional if="( $(wpcf-display-download-button) eq '1' )" debug="true"]
[types field='display-download-button' output='raw' show_name='true' item='$current_page'][/types]<br>
[types field='resource-download-link' item='$current_page'][/types]
[/wpv-conditional]
</p>
problem, on this page:
hidden link
you will notice that the data is all getting displayed:
Check to Display Redirect Link: 0
redirect-educators
Check to Display Download Button: 0
download-educators
even though in the backend I do not have the boxes checked to display
on this page:
hidden link
you see i have the redirect link box checked and the download box not checked and its displaying the download link anyway
I think the issue is with the elementor template system...
this page:
hidden link
the boxes on this page seem to control all pages