• UTAN_dev

    (@utan_dev)


    Hello everyone,

    I’m an experienced Drupal developer building my first WordPress site. As such, I’m faced with newbie problems. Here’s one that I haven’t been able to solve after searching for a solution.

    I added 2 images to Sponsor Carousel. The “[sponsors_carousel]” quickcode works fine when inserted into the body of a page, but the <?php echo sponsors_carousel(); ?> snippet outputs nothing when inserted into a template. My theme is Montezuma 1.1.9 and I’m adding the snippet to the footer.php sub-template, using the UI.

    What’s wrong? Thanks for your help.

    http://ww.wp.xz.cn/extend/plugins/sponsors-carousel/

Viewing 3 replies - 1 through 3 (of 3 total)
  • nomdecode

    (@nomdecode)

    Try <?php echo do_shortcode ('[sponsors_carousel]'); ?>

    http://codex.ww.wp.xz.cn/Function_Reference/do_shortcode

    Thread Starter UTAN_dev

    (@utan_dev)

    Thanks for your help. As it turns out, the Montezuma theme only allows a subset of PHP in its virtual files; to have your snippet correctly executed, I had to place it in a physical sub-template file, in a child theme.

    So the problem had nothing to do with Sponsor Carousel. With your help, I now have sponsor images in my footer. Thanks!

    nomdecode

    (@nomdecode)

    You’re welcome. Glad to hear everything works.

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

The topic ‘PHP snippet outputs nothing’ is closed to new replies.