Tell us what you are trying to do?
In a Divi Builder Text module, I am designing a page for some CPT.
In that design, I need to test IF the CPT as a certain field (a check box checked of not). This checkbox field is called 'societe-premium'
I've already used Toolset conditional shortcode in some previous site but here I can't.
The strangest thing is that I am able to display the field but not test it.
Exemple, in this page : hidden link (corresponding to a CPT where societe-premium IS CHECKED)
I have a text module with this "text" :
Here is the result now :
1
####################
wpv-conditional attributes
####################
Array
(
[if] => ( $(societe-premium) = '1' )
[debug] => true
)
####################
Debug information
####################
--------------------
Original expression: ( $(societe-premium) = '1' )
--------------------
After matching 1 numeric strings into real numbers: ( $(wpcf-societe-premium) = 1 )
Matched '1' to 1
--------------------
Converted expression: ( '' = 1 )
--------------------
Hi again. Doesn't work. Same result.
I've put that :
[types field="societe-premium"][/types]
[wpv-conditional if="('[types field='societe-premium'][/types]' eq '1')" debug="true"]
Do something
[/wpv-conditional]
and it prints that :
1
####################
wpv-conditional attributes
####################
Array
(
[if] => ('' = '1')
[debug] => true
)
####################
Debug information
####################
--------------------
Original expression: ('' = '1')
--------------------
After replacing 1 general variables and comparing strings: ('' = 1)
Comparing to 1
--> It still is converted to nothing whereas I am able to print it (!!!)...... good luck. I am really waiting for your next try. Good luck
The problem is that divi is overwriting the global variable for the page ID. In order to prevent this so that we can accurately get the data you will need to provide the shortcode like this.