PHP Code inside Shortcodes
-
Hey guys,
I have been struggling to figure this out. Is there any way to write a php code inside a shortcode to display it in a template? He is what I mean:
Take this:
<?php echo do_shortcode("[link item='example']"); ?>
And turn it into this:
<?php echo do_shortcode("[link item='SOME PHP HERE']"); ?>
What I am trying to do is define the item=’value’ in each post customfield and have the shortcode read that data as php, instead of defining the content inside the ” as text.
Is that possible somehow?
Thank you gang!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘PHP Code inside Shortcodes’ is closed to new replies.