• Resolved rcjr24

    (@rcjr24)


    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/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I don’t get your question. Doesn’t the above code work?

    Thread Starter rcjr24

    (@rcjr24)

    @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.

    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

    (@rcjr24)

    @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.