How to add a image Slider in wordpress header

Like you i also tried to add image slider to homepage of Wordpress Header. I searched for it a lot but couldn't find all the information at one place.In this post i am going to tell easy method to add a Slider.

Follow the below steps to insert the slider into Posts/Page:-

Crate a new Post/Page & Simply insert the shortcode mentioned below to display the slider:

Follow the below steps to insert the slider into your theme:-
1) Open the wordpress administrator
2) First thing you need to do is install the slider. For me [ Easing Slider "Lite" ] plugin worked.You can find the plugin below
3) After installing and activating the "Easing Slider" plugin
4) Goto:- Appearance -> Click on "Editor"
5) Right of the screen you can find Header.php file of the template you are currently using
6) Open it and add the add the following code at the appropriate place
<?php if ( function_exists( "easingsliderlite" ) ) { easingsliderlite(); } ?>
7) That's it

Note:- On adding the above code Image slider will be shown on all pages of the wordpress site.

But some people like the slider only on home page. In that case follow the simple step mentioned below on "how to add slider in wordpress to home page only"

Replace the following code
<?php if ( function_exists( "easingsliderlite" ) ) { easingsliderlite(); } ?>
With this code
<?php if ( is_front_page() ) { if ( function_exists ('easingsliderlite') ) { easingsliderlite(); } }?>

On some Themes Sliders will be aligned to left side of the screen. To set the Slider in the middle of the screen go to the following file
Path:- Sitename/wp-content/plugins/easing-slider/css/easingslider.min.css

Open the CSS file, FInd & Replace the following
Margin :- 0;
with this code
Margin: auto;

That's it will resolve the issue on some themes