wordpress - Using PHP inside a shortcode inside PHP... syntax issue -


ok, i'm ok php not expert. what's correct syntax here?

i'm trying pull in advanced custom field data inside php, inside shortcode.

i have acf field called: the_sub_field("google_doc_key")

<div><?php echo do_shortcode("[gdoc key='https://docs.google.com/spreadsheets/d/"'. the_sub_field("google_doc_key") .'"/edit' gid='0']"); ?></div> 

somethings not right here... appreciated.

<div><?php echo do_shortcode("[gdoc key='https://docs.google.com/spreadsheets/d/'". the_sub_field("google_doc_key") ."'/edit' gid='0']"); ?></div> 

try that, had ' , " mixed before the_sub_field


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -