Support

Account

Home Forums General Issues Using Shortcode in Template?

Solved

Using Shortcode in Template?

  • Hi is it possible to use the shortcodes in a custom single.php template?

    I tried using:

    <?php echo do_shortcode( '[acf field="{'my_map'}"]' ) ?>

    …but it does not show anything. Am I doing it wrong?

    P.S. I am trying to use shortcodes because for my case the standard get_field is causing errors with another plug in I’m trying to utilize.

  • Oops, found the problem. This works:

    <?php echo do_shortcode( '[acf field="my_map"]' ) ?>

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

The topic ‘Using Shortcode in Template?’ is closed to new replies.