# Replace featured slider on certain pages

**URL:** <https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954>\
**Category:** Travelify\
**Created:** [August 30, 2016, 2:08pm UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954 "2016-08-30T14:08:26Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![cargo2](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@cargo2](https://colorlibsupport.com/u/cargo2)\
**Post date:** [August 30, 2016, 2:08pm UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954/1 "2016-08-30T14:08:26Z")

</div>

Hi,  
I would like to show a static image instaed of the featured slider on several pages.  
Best would be only to show the featured image of a page where on other pages the featured slider is positioned. Any idea?  
(Link not possible - page still on local machine)

Hopefully - cargo2

---

<div class="post-metadata">

**Author:** ![movin](https://colorlibsupport.com/user_avatar/colorlibsupport.com/movin/32/10922_2.png) [@movin](https://colorlibsupport.com/u/movin)\
**Post date:** [August 31, 2016, 12:49pm UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954/2 "2016-08-31T12:49:18Z")

</div>

Hi @cargo2,

I hope you are well today and thank you for your question.

By default the slider is only displayed on the home page in Travelify theme.

You can display the featured image on the page by using the Travelify child theme shared in the following topic.

[https://colorlibsupport.com/t/headers-for-pages/](https://colorlibsupport.com/t/headers-for-pages/)

Best Regards,  
Movin

---

<div class="post-metadata">

**Author:** ![cargo2](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@cargo2](https://colorlibsupport.com/u/cargo2)\
**Post date:** [September 3, 2016, 3:43pm UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954/3 "2016-09-03T15:43:21Z")

</div>

Thanks for Your reply Movin,  
but it does not really help me to get further.  
I am looking for a way to do something like:  
If the current page/post has a defined featured image (“Beitragsbild”),  
let the featured slider only show this (and don’t rotate the other ones).  
If the currentpage has no defined featured image,  
do the standad job of the featured slider.

I hope, I could make clear what I want o get (I’m not natively speaking english… )

Best regards (and still hopeful)  
cargo2

---

<div class="post-metadata">

**Author:** ![cargo2](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@cargo2](https://colorlibsupport.com/u/cargo2)\
**Post date:** [September 3, 2016, 3:50pm UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954/4 "2016-09-03T15:50:13Z")

</div>

Me again…

Maybe it’s better to understand this way:  
STOP featured slider if featured image is defined on current page and only disply this.  
when no featured image on page, start slider.

Would be so cool, to get that running!

---

<div class="post-metadata">

**Author:** ![movin](https://colorlibsupport.com/user_avatar/colorlibsupport.com/movin/32/10922_2.png) [@movin](https://colorlibsupport.com/u/movin)\
**Post date:** [September 5, 2016, 9:14am UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954/5 "2016-09-05T09:14:54Z")

</div>

You can try achieving this by using the attached custom child theme of Travelify theme that contains some custom code.

---

<div class="post-metadata">

**Author:** ![cargo2](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@cargo2](https://colorlibsupport.com/u/cargo2)\
**Post date:** [September 5, 2016, 9:52am UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954/6 "2016-09-05T09:52:06Z")

</div>

Hi Movin,

thanx again for reply. I will try this in the evening and report ist it works.

Best regards,  
cargo2

---

<div class="post-metadata">

**Author:** ![cargo2](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@cargo2](https://colorlibsupport.com/u/cargo2)\
**Post date:** [September 5, 2016, 8:03pm UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954/7 "2016-09-05T20:03:38Z")

</div>

Well, it does the job, but only partly…  
It puts the featured image on top position into the `div.entry-content`.  
But `section.featured-slider` (where it should be, with the same size as the slider) is gone.  
Unfortunately I am not able to change the code in the template (or where ever) in a way, that the featured slider is just replaced by the `figure.post-featured-image`  
I guess it should be done with some javaScript saying something like:  
If page has featured-image-slider and page has featured-image, tell featured-image-slider to stop sliding and only show featured-image, else start sliding…  
I am sure, this is possible, but I don’t have a clue how to do it.  
Is there anybody else able to do this, or has an idea where and how to edit the code?  
Would be great!!!

Still hopeful,  
cargo2

---

<div class="post-metadata">

**Author:** ![cargo2](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@cargo2](https://colorlibsupport.com/u/cargo2)\
**Post date:** [September 5, 2016, 10:07pm UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954/8 "2016-09-05T22:07:10Z")

</div>

Again me…  
I moved the `<figure class="post-featured-image">` from `<div class="entry-content clearfix">` into the header underneeth the `<nav id="main-nav" class="clearfix">`. Looks how it should 🙂  
Temporaly by Firebug only ☹  
But this job should be done by the functions.php of the child theme as it seems to me!  
As far as I can read the functions.php file of the child theme, it says **NOT** to show the `<section class="featured-slider">` in the header **BUT** to generate and insert the `<figure class="post-featured-image">` as first element inside the `<div class="entry-content clearfix">`  
No problem for someone speaking php I think - but I only speak css and html :-((  
The piano is in the house - but it was put into the cellar, not in the salon in the upper floor … 😉  
Anybody here able to get the piano upstairs??  
The colorlib-child-theme-59.zip with the functions.php inside was posted by Movin above…

Almost desperate,  
cargo2

---

<div class="post-metadata">

**Author:** ![cargo2](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@cargo2](https://colorlibsupport.com/u/cargo2)\
**Post date:** [September 5, 2016, 10:22pm UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954/9 "2016-09-05T22:22:49Z")

</div>

Additionally here two screens to explain the problem.

---

<div class="post-metadata">

**Author:** ![movin](https://colorlibsupport.com/user_avatar/colorlibsupport.com/movin/32/10922_2.png) [@movin](https://colorlibsupport.com/u/movin)\
**Post date:** [September 6, 2016, 8:28am UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954/10 "2016-09-06T08:28:01Z")

</div>

To achieve this use the attached modified child theme instead of previously shared child theme.

---

<div class="post-metadata">

**Author:** ![cargo2](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/c/7feea3/32.png) [@cargo2](https://colorlibsupport.com/u/cargo2)\
**Post date:** [September 6, 2016, 4:59pm UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954/11 "2016-09-06T16:59:51Z")

</div>

Good evening(?) Movin,

IT WORKS !!! Exactly what I needed.  
Thanks a lot for Your help and patience !!!  
It’s just great, to get support like this for a free theme.  
I’ll tell everybody 🙂

Best regards from Berlin,  
cargo2

---

<div class="post-metadata">

**Author:** ![movin](https://colorlibsupport.com/user_avatar/colorlibsupport.com/movin/32/10922_2.png) [@movin](https://colorlibsupport.com/u/movin)\
**Post date:** [September 7, 2016, 6:41am UTC](https://colorlibsupport.com/t/replace-featured-slider-on-certain-pages/11954/12 "2016-09-07T06:41:36Z")

</div>

You are most welcome here 🙂
