Title: do shortcode sample
Last modified: August 21, 2016

---

# do shortcode sample

 *  Resolved [rcjr24](https://wordpress.org/support/users/rcjr24/)
 * (@rcjr24)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/do-shortcode-sample/)
 * hi, i just want to ask if how could i make use of the page template code for 
   this, could you show me an example? just for my good reference coz i like to 
   insert slider on template files.
    <?php if ( class_exists( ‘BXSG_ThemeUtils’ )){
   echo do_shortcode(‘[slider]’);//just for an example } ?>
 * [http://wordpress.org/plugins/bxslider-integration/](http://wordpress.org/plugins/bxslider-integration/)

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

 *  Plugin Author [Vincent Mimoun-Prat](https://wordpress.org/support/users/vprat/)
 * (@vprat)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/do-shortcode-sample/#post-4309636)
 * I don’t get your question. Doesn’t the above code work?
 *  Thread Starter [rcjr24](https://wordpress.org/support/users/rcjr24/)
 * (@rcjr24)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/do-shortcode-sample/#post-4309648)
 * [@vincent](https://wordpress.org/support/users/vincent/)
    I mean, in bxslider
   wp if you’d like to put somewhere on your template files you just have to put
   like this “<?php echo do_shortcode(‘[bxslider id=”slider-1″]’); ?>”. Here in 
   integration, if in the shortcode you could do like this [slider] This is my first
   slide. [next-slide] This is my second slide. [/slider] what about if im gonna
   do it manually inside of this tags? What should im gonna call/consider? <?php
   if ( class_exists( ‘BXSG_ThemeUtils’ ) ) {
 * }
    ?>
 * The above i post doesn’t also works for me coz i know there is something missing.
   Though i took browse on internet but i found nothing just to hope that there 
   could be a good reference for me as an example.
 *  Plugin Author [Vincent Mimoun-Prat](https://wordpress.org/support/users/vprat/)
 * (@vprat)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/do-shortcode-sample/#post-4309652)
 * Not sure if I understand but you can do:
 *     ```
       <?php
         $slider = '[slider]';
         $slider .= 'This is my first slide.';
         $slider .= '[next-slide]';
         $slider .= 'This is my second slide';
         $slider .= '[/slider]';
   
         echo do_shortcode( $slider );
       ?>
       ```
   
 *  Thread Starter [rcjr24](https://wordpress.org/support/users/rcjr24/)
 * (@rcjr24)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/do-shortcode-sample/#post-4309655)
 * [@vincent](https://wordpress.org/support/users/vincent/)
    Thats what i exactly
   mean. Thanks for your reply, I really appreciate your help. ^_^

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

The topic ‘do shortcode sample’ is closed to new replies.

 * ![](https://ps.w.org/bxslider-integration/assets/icon-256x256.png?rev=984158)
 * [bxSlider integration for WordPress](https://wordpress.org/plugins/bxslider-integration/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bxslider-integration/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bxslider-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/bxslider-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bxslider-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bxslider-integration/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [rcjr24](https://wordpress.org/support/users/rcjr24/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/do-shortcode-sample/#post-4309655)
 * Status: resolved