Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
1  
It might be helpful if you show us the code you are inserting. –  Charles Clarkson Oct 11 '13 at 6:38
    
Depending on your template, there should be a header.php or a variation thereof in the theme that you can change the code in and place an image slider via code or plugin. –  Nina May 10 '14 at 6:48

5 Answers 5

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 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 wowslider(1); ?>

Hope it has helped :)

share|improve this answer

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/

share|improve this answer

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.

;-)

share|improve this answer

There is two options to insert a slideshow into your website.

  1. Download a slider plugin and embed it into the header of your website. Example: Cyclone Slider 2

  2. Create your own slider - Always practice this, it should help to study advanced WordPress stuffs (ton's of tutorials are available for this).

If you are downloading plugins there should be options to include slideshow as shortcode or their own function.

share|improve this answer

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.

share|improve this answer
    
Please state your affiliation to this program. –  Pieter Goosen Nov 1 '14 at 14:38
    
I'm not affiliated to them. It's a tool I found on the internet. –  Vicki Nov 3 '14 at 16:24
    
You should add that in an edit to your answer :-) –  Pieter Goosen Nov 3 '14 at 16:51
    
I just tried and it wouldn't let me :) –  Vicki Nov 5 '14 at 20:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.