Variable in shortcode
-
Hi,
I wonder if it is possible to add a variable in the call to an HTML shortcode and then evaluate it in php code
By example calling the shortcode in the page like this [code_snippet id=25 php format color=”blue”] or [code_snippet id=25 php format color=”red”]
And then evaluate it in the code link this
if ($color == ‘blue’){
do something…
}
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Variable in shortcode’ is closed to new replies.