How to Add an Image Slider in WordPress Header
Do you want to create an image slider in the header of your site? Sometimes you need to display the best deals, call to actions or good photos in your site header having an image slider, so it looks professional to the visitors. In this tutorial, we will share how to add an image slider in WordPress header.
By default, there is no option to add an image slider in WordPress header. However, a few WordPress themes may offer plugins to create sliders. We recommend you to use Soliloquy slider plugin that is simple yet comes with tons of features. It allows you to add the image slider in the header of your site easily.
To add an image slider in WordPress header, you’ll need to follow these 3 steps:
- Step 1. Install and activate Soliloquy slider plugin
- Step 2. Create an image slider for WordPress header
- Step 3. Copy the template tag and add it in theme’s header
When this tutorial ends, you’ll be able to add an image slider in WordPress header that will look like as shown in this image below:
Ready to get started? Let’s go!
Step 1: Install and Activate Soliloquy Slider Plugin
The first thing you need to do is to install and activate Soliloquy image slider WordPress plugin on your site.
Want to know more about installation? Check out this simple guide on how to install and activate Soliloquy plugin.
Step 2: Create an Image Slider for WordPress Header
Once the plugin is activated, you should go to Soliloquy » Add New to create a new image slider. To start with it, you need to add the title and drop the photos in the Native Slider section.
Hit the Publish button on the right side of your screen. For more slider settings, you should check out our guide on how to create an image slider in WordPress.
Step 3: Copy the Template Tag and Add it in Theme’s Header
Upon publishing the image slider, you will see a new widget on the right side as Soliloquy Slider Code. Simply copy the template tag from here:
Now you should go to the
header.php file of your WordPress theme. You can find it in Appearance » Editor at your WordPress admin backend.
Note: Make sure to backup your site before editing your template files, since an error could bring your whole site down.
Go ahead and paste the shortcode in this file as shown in the image below:
Note that this example is using the default WordPress theme Twenty Sixteen. Your file may look different if you’re using a different theme, and you may have to paste the code in a different location.
Once you save your changes, your image slider will appear in the WordPress header on all pages of your site that’ll look like as shown in this image below:
That’s all. We hope this tutorial has helped you to learn how to add an image slider in WordPress header. You may also want to check out our guide on how to add an image slider to a sidebar in WordPress. In case, your slider images are not ranking in search engines, you should check this ultimage WordPress SEO guide for beginners.