contacts

Get All 146 Premium WordPress Themes for Just $59.99
One-Time Payment: Unlimited Use Across Unlimited Domains, Plus Free Lifetime Updates! Learn more

Display Slider on All Website Pages Except Certain Pages

Our premium themes come with built-in Sliders with options to display it only on Homepage or on all website pages:

  1. Login to your Admin Panel
  2. Navigate to Left Menu -> Appearance -> Customize -> ‘Slider’ Section
  3. Check ‘Display Slider in Home Page’ or ‘Display Slider in All Website Pages’ checkboxes
  4. Save Changes

In some cases you may want to display the Slider on All Website pages and hide it only for certain pages. Here is a guide how it can be done:

Make Sure Slider is Displayed on All Pages

First, you need to display the Slider on all pages:

  1. Login to your Admin Panel
  2. Navigate to Left Menu -> Appearance -> Customize -> ‘Slider’ Section
  3. Check the ‘Display Slider in All Website Pages’ checkbox
  4. Save Changes

Get Page/Post IDs on which you want to hide Slider

The second step is to get a list of pages or posts IDs on which you want to hide the slider.

You can get a Page or Post ID by opening the page or post in Admin Panel for edit, then copy the ‘post’ value from the URL, i.e.

The above post has Post ID = 1676

Add Functionality to Skip Displaying of Slider for Post IDs

The last step is to add a small code change which actually skips displaying of slider for specific post IDs:Login to your Admin Panel

Navigate to Left Menu -> Appearance -> Theme Editor

Open header.php (Theme Header)

Replace the below code:

<?php if ( tishonator_should_display_slider() ) :

with:

<?php if ( tishonator_should_display_slider()
&& !in_array( get_the_ID(), array('1676', '1677', '1678') ) ) :

where 1676, 1677, 1678 are posts IDs from previous step.

Save Changes