• Phil

    (@owendevelopment)


    Ok, I’m OK with PHP but not an expert. What’s the correct syntax here?

    I’m trying to pull in an Advanced Custom Field data INSIDE some PHP, which is INSIDE a shortcode.

    I have an ACF field called: the_sub_field(“google_doc_key”)

    <div><?php echo do_shortcode(“[gdoc key=’https://docs.google.com/spreadsheets/d/”&#8216;. the_sub_field(“google_doc_key”) .'”/edit’ gid=’0′]”); ?></div>

    Somethings not right here… any help is appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding PHP into a shortcode’ is closed to new replies.