Quantcast
Channel: Tishonator
Viewing all articles
Browse latest Browse all 293

HomePage Slider: Increase Number of Slides (more than 10)

$
0
0

By default, you can add up to 10 different Slides in the Homepage Slider for our Premium themes.

However, in some cases you may need to add even more Slides i.e. up to 20.

It will require some small code changes. Here all of the necessary steps:

  1. Install and Activate the WP Editor plugin:https://wordpress.org/plugins/wp-editor/It is a very useful plugin which allows you to edit files inside all of the theme folders:
    WP Editor Plugin
  2. Navigate to Admin Panel -> Left Menu -> Appearance -> Theme Editor
  3. Open theme/inc/customizer.phpSearch for this text:

    // Add slide settings
    for ( $slideNumber = 1; $slideNumber <= 10; ++$slideNumber ) {

    and update it to:

    // Add slide settings
    for ( $slideNumber = 1; $slideNumber <= 20; ++$slideNumber ) {

    * The updated text is mared in bold.

    Customizer Slides Number Update

    Then save changes by clicking on the ‘Update File’ button

  4. Open theme/inc/utilities.php

    Search for this text:

    // display slides
    for ( $i = 1; $i <= 10; ++$i ) {

    and update it to:// display slides
    for ( $i = 1; $i <= 20; ++$i ) {

    * The updated text is mared in bold.

    Utilities Slides Number Update

    Then save changes by clicking on the ‘Update File’ button

  5. That’s all 🙂 Now navigate to Admin Panel -> Left Menu -> Appearance -> Customize -> Slider Section and you will be able to add up to 20 different slides:Customizer 20 Slides

Viewing all articles
Browse latest Browse all 293

Trending Articles