Support » Plugin: WP Boxer » Possible to add to template, instead of using shortcode?

  • Resolved kitelife

    (@kitelife)


    Straightforward question… Is there a piece of code I can add to my theme’s homepage file, rather than using only the shortcode on pages and posts?

    Love the Boxer concept, just need to be able to implement it on our widgeted home page. 😉

    http://wordpress.org/extend/plugins/boxer/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Coding Our Web

    (@codingourweb)

    Have you tried using the Text widget? That one supports shortcodes.

    Or am I totally missing the point here 😉

    kitelife

    (@kitelife)

    Thanks for the reply.

    Yes, sorry – it won’t work as a widget for us… We want to hardcore this into a specific, non-widgeted part of our home page.

    Plugin Author Coding Our Web

    (@codingourweb)

    Are we talking PHP code here?

    kitelife

    (@kitelife)

    Ya, I would assume so.

    Plugin Author Coding Our Web

    (@codingourweb)

    Then you can use do_shortcode

    kitelife

    (@kitelife)

    I created a block titled with the slug “home-page”, then added this to my Main Index template…

    <?php echo do_shortcode( [wpbp_blocks set="home-page"] ) ?>

    Got this error:

    Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in /home/user/public_html/wp-content/themes/themename/index.php on line 15

    Any suggestions? 🙂

    Plugin Author Coding Our Web

    (@codingourweb)

    Yeah, try adding quotation marks like so:

    <?php echo do_shortcode( '[wpbp_blocks set="home-page"]' ); ?>

    kitelife

    (@kitelife)

    Bingo, that did it – thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Possible to add to template, instead of using shortcode?’ is closed to new replies.