Adding php within shortcode?
-
I’m having an issue with the shortcode.
Here’s what i have in my theme file:<?php echo do_shortcode('[geot exclude_country="CA"]' . get_field("details") . '[/geot]'); ?> <?php echo do_shortcode('[geot country="CA"]' . get_field("details_cad") . '[/geot]'); ?>
The issue is that the [/geot] shows up in the front end. I’m assuming the get_field tag is causing the shortcode to end before the actual [/geot]. The issue is I have the two shortcodes and i’m not sure what the best method for doing this is….
Has anyone else had this issue?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Adding php within shortcode?’ is closed to new replies.