• Hey all,

    Love the plugin. I bought the custom short code addon because I thought it would let me just embed php (rather than an echo/return function).

    My need is to include beers.php – a template file with a custom loop that grabs X posts – the variable.

    I created the shortcode [beers] with the attribute ‘count’ and that seems to go well.

    The problem is that I can’t get it to process all the PHP, which includes calls to Advanced Custom Fields ( get_thefield($count); – that kind of thing).

    Is there a way to use a PHP include and point to the beers.php or include the default template short code in the custom short code settings and pass it the variable?

    Thoughts?

    https://ww.wp.xz.cn/plugins/shortcodes-ultimate/

The topic ‘Include a template & pass a variable.’ is closed to new replies.