Soliloquy Blog

WordPress slider tips, Tutorials and Resources.

How to Add a Homepage Slider in WordPress

by Waseem Abbas on July 5, 2022

Do you want to create a slider for your homepage? Sometimes your theme doesn’t come with a homepage slider, and you want to add one using a plugin. In this article, we will share how to add a homepage slider in WordPress.

Many website owners use a moving slider on their homepage to engage their visitors or to display their portfolio. Some WordPress themes come with a simple homepage slider included, but many do not. For the most fully-featured homepage slider, you’ll need to install the Soliloquy WordPress plugin.

To add a homepage slider in WordPress, you’ll need to follow these 3 steps:

  • Step 1. Install and activate Soliloquy WordPress plugin
  • Step 2. Create an image slider with Soliloquy
  • Step 3. Copy and paste the shortcode or template tag to your homepage

Ready to get started? Let’s go!

Step 1: Install and Activate Soliloquy WordPress Plugin

First thing you need to do is install and activate Soliloquy WordPress slider plugin.

Soliloquy website

If you need help with this step, then check out our guide on how to install Soliloquy.

Step 2: Create an Image Slider with Soliloquy

Once you’ve installed and activated Soliloquy, create your homepage slider by going to Soliloquy ยป Add New from your WordPress admin backend.

Start by adding a title for your homepage slider. Then drop your images into the Native Slider area.

Add Images

After adding your images, you can go to the Config tab to adjust your settings. Once you are happy, hit the Publish button to save your changes.

For more details on creating your homepage slider with Soliloquy, check out our guide on how to create an image slider in WordPress.

Step 3: Copy and Paste the Shortcode or Template Tag to Your Homepage

Now that you’ve created your homepage slider, now it’s time to add it to the homepage on your site.

There are two simple ways to add a Soliloquy slider to your homepage: using a shortcode, or using a template tag. Let’s have a look at each method…

Method One: Use the Shortcode

This is the simplest method to add a slider to your homepage. From the edit screen of your homepage slider, simply copy the shortcode inside the Soliloquy Slider Code widget.

Copy Shortcode

Then, edit your home page and paste the shortcode into the visual editor.

Edit Homepage to Paste Shortcode

That’s it! Now your homepage slider will appear on your WordPress site.

Method Two: Add the Template Tag to Your Theme’s Template File

If you want your homepage slider to be added to your theme’s header, you’ll need to use the template tag.

First, edit your image slider and copy the template tag from the Soliloquy Slider Code widget.

Copy Template Tag

Then, paste the template tag to your header.php file, so it will be displayed in the header on your homepage and the other pages on your site.

Edit Theme File

That’s it! We hope this article has helped you to learn how to add a homepage slider in WordPress. You may also want to check out our guide on how to create a WordPress slider for custom post types.

If you like this article, then please follow us on Facebook and Twitter for more free WordPress tutorials. You can also subscribe to our newsletter on the right of this page!

Waseem Abbas is a content writer for SoliloquyWP and Envira Gallery.



    May 3, 2017

    This is the best article from soliloquywp; and easy to understood


      Waseem Abbas

      May 4, 2017

      Hey Michael, glad you like this article. ๐Ÿ™‚ Do follow us on Facebook and Twitter for more free WordPress guides.



    June 29, 2017

    Why dont you show WHERE to add the template tag. That’s the most important information of this article…and its missing. I am sorry, but explaining the obvious while not explaning the important things is not very helpful. You could say it is useless I guess.
    And why do you even upload an Image of the Header.php if the template tag isn’t in there? Just WHY?

    That is the information noobs like me need.


      Waseem Abbas

      July 3, 2017

      Hello Matthias, you can add the template tag in header.php file where you want to display your image slider to the homepage. It is same with the shortcode. If you further need any assistance on where to place the template tag, then feel free to ask me here. ๐Ÿ™‚



        August 16, 2017

        Hi! Can you please explain step by step how to add this to the header.php file? I am not sure where to find it or add the shortcode.


          Waseem Abbas

          August 19, 2017

          Hey Ebony, you can add the template tag in your header.php file at the place where you want to display the slider on homepage. Shortcodes are recommended for WordPress pages and posts.


            Kait Vanosch

            January 20, 2019

            But how do we access the header file so we can make changes to it? Not every theme allows this?


    January 10, 2018

    I already have one homepage slider,but i did another slider and i want to change to new one without delecting old one…How can i do ?


    Brenda Doro

    July 31, 2019

    I have the header.php file up and I inspected the elements on the page using just the google Inspect Element option, but I want the slider to come under my theme main menu. I can find the main menu. I inserted the code after all the s at the end of the code . But that’s just putting the code on the main page not the images that the code represents. Help!
    Thank you,


Leave a Reply

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.