# Different repeat posting in slider topics

**URL:** <https://colorlibsupport.com/t/different-repeat-posting-in-slider-topics/22971>\
**Category:** Travelify\
**Created:** [November 28, 2018, 5:11am UTC](https://colorlibsupport.com/t/different-repeat-posting-in-slider-topics/22971 "2018-11-28T05:11:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![flyctory](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/f/858c86/32.png) [@flyctory](https://colorlibsupport.com/u/flyctory)\
**Post date:** [November 28, 2018, 5:11am UTC](https://colorlibsupport.com/t/different-repeat-posting-in-slider-topics/22971/1 "2018-11-28T05:11:41Z")

</div>

Dear all  
I learned in [this thread](https://colorlibsupport.com/t/remove-slider-from-mobile/) how to deactivate the slider for mobiles only. Worked very well for me.

However, I typically do not repeat the postings which are in the slider in the list of postings below. Which means, when I introduce the code given there, my latest postings are not shown on the main access page for a mobile at all. Can I change this slider setting for mobile only?

Thanks,  
Florian

---

<div class="post-metadata">

**Author:** ![colorlibsupport](https://colorlibsupport.com/user_avatar/colorlibsupport.com/colorlibsupport/32/1494_2.png) [@colorlibsupport](https://colorlibsupport.com/u/colorlibsupport)\
**Post date:** [November 28, 2018, 6:15am UTC](https://colorlibsupport.com/t/different-repeat-posting-in-slider-topics/22971/2 "2018-11-28T06:15:34Z")

</div>

Hello Florian

Last part of the question is not clear ☹ can you tell me what is your goal?  
also, include link to your website

“Can I change this slider setting for mobile only?” - No, there is no such setting

---

<div class="post-metadata">

**Author:** ![flyctory](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/f/858c86/32.png) [@flyctory](https://colorlibsupport.com/u/flyctory)\
**Post date:** [November 28, 2018, 9:25am UTC](https://colorlibsupport.com/t/different-repeat-posting-in-slider-topics/22971/3 "2018-11-28T09:25:14Z")

</div>

Sorry for being unclear.

Let’s say my ten recent postings are A, B, C, D, E, F, G, H, I and J. I selected the four newest postings, A to D for my slider. As I show six postings per page, E to J will be presented underneath as I activated the _Check to exclude slider post from Homepage posts_ .

If I now deactivate the slider with the code, the slider is gone, but it still displays the postings E to J on the website. I would rather like to see A to F on the mobile version instead. Can I customize that selection, depending on the device / whether the slider is active or not?

Thanks a lot,  
Florian

---

<div class="post-metadata">

**Author:** ![mikesupport17](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/m/bc8723/32.png) [@mikesupport17](https://colorlibsupport.com/u/mikesupport17)\
**Post date:** [November 28, 2018, 1:02pm UTC](https://colorlibsupport.com/t/different-repeat-posting-in-slider-topics/22971/4 "2018-11-28T13:02:19Z")

</div>

Hello @flyctory,

So you want to have a different set of slides available for the mobile and desktop version of the website?

Let me know if that is correct.

Best Regards,  
Support

---

<div class="post-metadata">

**Author:** ![flyctory](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/f/858c86/32.png) [@flyctory](https://colorlibsupport.com/u/flyctory)\
**Post date:** [November 28, 2018, 4:19pm UTC](https://colorlibsupport.com/t/different-repeat-posting-in-slider-topics/22971/5 "2018-11-28T16:19:52Z")

</div>

Hi,  
I would like to do to things:

- No slider on mobile phone resolution -\> made it
- The visitor is able to see the latest postings. For desktops, these are in the slider (A to D in my example) plus the ones automatically shown below (E to J). However, when I deactivate the slider for mobiles by the code, it still shows E to J as the postings, A to D are "hidden" because the option to exclude slider posts from homepage posts is still applied and A to D are seen as slider posts, though there is no slider any more. There seems to be a global routine to select the latest postings shown underneath the slider - and I would like to customize the selection depending on the machine the visitor is using. 

Hope it becomes clearer…

Thanks,  
Florian

---

<div class="post-metadata">

**Author:** ![mikesupport17](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/m/bc8723/32.png) [@mikesupport17](https://colorlibsupport.com/u/mikesupport17)\
**Post date:** [November 29, 2018, 10:51am UTC](https://colorlibsupport.com/t/different-repeat-posting-in-slider-topics/22971/6 "2018-11-29T10:51:41Z")

</div>

Hello @flyctory,

Thanks for clarifying.

In this case, you will have to add a condition to remove the mobile slider feature. This code should help:

```auto

function remove_travelify_actions(){

if( wp_is_mobile() ){
	remove_all_actions( 'travelify_featured_post_slider' );
	remove_all_actions('travelify_featured_post_slider');
}
}
add_action('init', 'remove_travelify_actions');

```

If this still does not work then you would need to enlist the aid of a third party developer because this will require more complex code and support than we can provide here. You can find a developer here:  
[https://colorlib.com/out/envatostudio](https://colorlib.com/out/envatostudio)

Best Regards,  
Support

---

<div class="post-metadata">

**Author:** ![flyctory](https://colorlibsupport.com/letter_avatar_proxy/v4/letter/f/858c86/32.png) [@flyctory](https://colorlibsupport.com/u/flyctory)\
**Post date:** [November 29, 2018, 3:22pm UTC](https://colorlibsupport.com/t/different-repeat-posting-in-slider-topics/22971/7 "2018-11-29T15:22:19Z")

</div>

Hi,  
unfortunately, it did not work, but with your thoughts, I somehow could solve it. Around line 260 in the functions.php, there is the code, which manipulates selection of postings to be displayed, depending on the setting I mentioned:

```auto
		if ( $options['exclude_slider_post'] != "0" && !empty( $options['featured_post_slider'] ) ) {
			if( $query->is_main_query() && $query->is_home() ) {
				$query->query_vars['post__not_in'] = $options['featured_post_slider'];
			}
		}

```

I just conditioned it, in addition to the php I linked before:

```auto
	if( !wp_is_mobile() ){
		if ( $options['exclude_slider_post'] != "0" && !empty( $options['featured_post_slider'] ) ) {
			if( $query->is_main_query() && $query->is_home() ) {
				$query->query_vars['post__not_in'] = $options['featured_post_slider'];
			}
		}
	}

```

Finally, so easy… Thanks a lot for your support… Without all the help, I would not have dared to manipulate the php 🙂

---

<div class="post-metadata">

**Author:** ![colorlibsupport](https://colorlibsupport.com/user_avatar/colorlibsupport.com/colorlibsupport/32/1494_2.png) [@colorlibsupport](https://colorlibsupport.com/u/colorlibsupport)\
**Post date:** [November 29, 2018, 4:00pm UTC](https://colorlibsupport.com/t/different-repeat-posting-in-slider-topics/22971/8 "2018-11-29T16:00:53Z")

</div>

That’s great 🙂  
I will close this case now, Feel free to contact us again if you have other questions Thanks!
