Adding an image slider in the header of my site

I am new to WordPress. Can you please suggest the steps to insert an image slider in my site’s header? I don’t know how to insert the code or where.

Related posts

5 comments

  1. Depends on what theme you are using because some include hooks which make the job easier.

    For themes which don’t include hooks like Twenty Eleven & Twenty Twelve, you can simply past the PHP tag for the slider into the header.php file in the position you want your slider to display.

    Example if using the free version of Soliloquy:

        <?php if ( function_exists( 'soliloquy_slider' ) ) soliloquy_slider( '007' ); ?>
    

    Simply replace the 007 with the i.d for your slider which is generated once you create a new slide show.

    If you only want to display your slider on the front page, add a conditional tag to the code like this:

       <?php if ( is_front_page() && function_exists( 'soliloquy_slider' ) ) soliloquy_slider( '007' ); ?>
    

    Note: You should copy your parent themes header.php file to a child theme before adding the code for the slider otherwise you may lose it if you update the parent theme.

    If your theme includes hooks, then you can add a custom function in your child themes functions.php file like this:

        function soliloquy_slider_header() {
        if ( function_exists( 'soliloquy_slider' ) ) soliloquy_slider( '007' );
        };
        add_action('your_header_hook', 'soliloquy_slider_header');
    

    Source: http://wpsites.net/best-plugins/add-soliloquy-slider-in-header-of-any-theme/

  2. You generally do it by installing an image slider plugin and then using the plugin options to do that for you. Most of such plugins come with the shortcode options only, and do not provide automatic slider addition to the other sections, so you have to do it manually.

    To add stuff manually, one should have the basic knowledge of editing WordPress themes. Here is a small absolute-beginner-level how-to:

    To add the slider in the header section of your site, you need to go to Appearance > Editor in your WordPress dashboard, then edit the header.php file, and finally add the code that is needed to display the slider.

    For example, if you install Wowslider, you will need to add this bit of code in your theme’s header.php.

    <?php
      if( function_exists( 'wowslider' ) ) {
        wowslider(1);
      }
    ?>
    

    Hope it has helped 🙂

  3. You can embed this free image slider widget inside your web page. It’s just a code you copy and paste into your page or anywhere you want to embed it. It’s free and you can use it on unlimited pages.

  4. Maybe There is no option to add header slider more than 4 picts. But you can try to add a Siteorigin Slider widgets to the row then deactivate/hide the default header slider.

  5. Quite often, the easiest way of doing this is via a plugin (http://wordpress.org/plugins/search.php?q=slider&sort=) or via a built-in one in the theme.

    Lots of modern themes have sliders built in that you can just adjust through the admin section (i.e. upload / resize the images you want) and then drop the ‘shortcode’ (i.e. [myslider]) on to your page.

    😉

Comments are closed.