How can I put my slider insde a template? for example header

Creative Image Slider i WordPress is a responsive jQuery image slider with amazing visual effects.

  • Greetings for All

    I have downloaded the plugin to try, and I have noticed a tab called "creative image slider" on the left menu. It serves to manage sliders. Whenever you create a new slider, the plugin automatically genererates a code to put the same slider inside a post or page.

    However, what if I want a template like header or index to have the same slider? In othe words, how to put it directly on php instead of some page on the wp admin?
    FelipSAMA
     
    Posts: 1
    Joined: Thu Sep 25, 2014 11:13 pm


  • Hello,

    You need to call a php do_shortcode function.

    Code: Select all
    <?php echo do_shortcode('[creativeslider id="N"]'); ?>


    Where N is id of desired slider.
    Best Regards,

    Simon
    User avatar
    Simon
    Site Admin
     
    Posts: 1499
    Joined: Wed Mar 05, 2014 1:04 am


  • Hope you figured this out already. For anyone else what he means is find the page.php file in the editor. In my case I wanted it included in the layout div tag, so I put it on around this area and it works fine. Code before and after to help you find in the page where to put it.

    <?php get_header(); ?>

    <?php
    /** Themify Default Variables
    * @var object */
    global $themify; ?>

    <!-- layout-container -->
    <div id="layout" class="pagewidth clearfix">
    <?php echo do_shortcode('[creativeslider id="1"]'); ?> <------------------------RIGHT HERE
    <?php themify_content_before(); // hook ?>
    <!-- content -->
    <div id="content" class="clearfix">
    eladconsulting
     
    Posts: 2
    Joined: Wed Jan 13, 2016 3:49 am


  • Thanks for provided info.
    Best Regards,

    Simon
    User avatar
    Simon
    Site Admin
     
    Posts: 1499
    Joined: Wed Mar 05, 2014 1:04 am



Return to Creative Image Slider WordPress




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest