skip to Main Content
Our free WordPress themes are downloaded over 3 MILLION times. Get them now!

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Different repeat posting in slider topics #198527

    flyctory
    Participant

    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:

    		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:

    	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 🙂

    in reply to: Different repeat posting in slider topics #198379

    flyctory
    Participant

    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

    • This reply was modified 5 months, 3 weeks ago by  flyctory.
    in reply to: Different repeat posting in slider topics #198280

    flyctory
    Participant

    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

    • This reply was modified 5 months, 3 weeks ago by  flyctory.
Viewing 3 posts - 1 through 3 (of 3 total)
Disclosure: This page contains external affiliate links that may result in us receiving a commission if you choose to purchase mentioned product. The opinions on this page are our own and we don't receive additional bonus for positive reviews.
Back To Top