Skip to content
Public Ticket #11636

Slider

Conversation thread

PenciDesign replied

Staff Reply

Hi,

Ahh, ok. please replace the code I sent to this code:

/**
 * Hide featured slider & featured boxes in next page
 */
if( ! function_exists( 'penci_hide_featured_slider_next_page' ) ) {
    function penci_hide_featured_slider_next_page( $data ) {
        $paged = get_query_var( 'paged', 1 );
        if( is_home() && $paged > 1 ) {
            return false;
        } else {
            return $data;
        }
    }
    add_filter( 'theme_mod_penci_featured_slider', 'penci_hide_featured_slider_next_page' );
}
if( ! function_exists( 'penci_hide_featured_boxes_next_page' ) ) {
    function penci_hide_featured_boxes_next_page( $data ) {
        $paged = get_query_var( 'paged', 1 );
        if( is_home() && $paged > 1 ) {
            return true;
        } else {
            return $data;
        }
    }
    add_filter( 'theme_mod_penci_home_hide_boxes', 'penci_hide_featured_boxes_next_page' );
}
if( ! function_exists( 'penci_hide_heading_title_next_page' ) ) {
    function penci_hide_heading_title_next_page( $data ) {
        $paged = get_query_var( 'paged', 1 );
        if( is_home() && $paged > 1 ) {
            return '';
        } else {
            return $data;
        }
    }
    add_filter( 'theme_mod_penci_home_title', 'penci_hide_heading_title_next_page' );
}

Best Regards,

PenciDesign

berriesandpassion replied

Customer Reply

I mean this part the title under the featured boxes

berriesandpassion replied

Customer Reply

I want to hide the part: Home page title latest posts. 

I want this title only on the first site.

PenciDesign replied

Staff Reply

Hi,

Do you mean hide featured categories on next pages?

If right, please replace the code I sent to this code:

/**
 * Hide featured slider & featured boxes in next page
 */
if( ! function_exists( 'penci_hide_featured_slider_next_page' ) ) {
    function penci_hide_featured_slider_next_page( $data ) {
        $paged = get_query_var( 'paged', 1 );
        if( is_home() && $paged > 1 ) {
            return false;
        } else {
            return $data;
        }
    }
    add_filter( 'theme_mod_penci_featured_slider', 'penci_hide_featured_slider_next_page' );
}
if( ! function_exists( 'penci_hide_featured_boxes_next_page' ) ) {
    function penci_hide_featured_boxes_next_page( $data ) {
        $paged = get_query_var( 'paged', 1 );
        if( is_home() && $paged > 1 ) {
            return true;
        } else {
            return $data;
        }
    }
    add_filter( 'theme_mod_penci_home_hide_boxes', 'penci_hide_featured_boxes_next_page' );
}
if( ! function_exists( 'penci_hide_featured_categories_next_page' ) ) {
    function penci_hide_featured_categories_next_page( $data ) {
        $paged = get_query_var( 'paged', 1 );
        if( is_home() && $paged > 1 ) {
            return '';
        } else {
            return $data;
        }
    }
    add_filter( 'theme_mod_penci_home_featured_cat', 'penci_hide_featured_categories_next_page' );
}

Best Regards,

PenciDesign

berriesandpassion replied

Customer Reply

great, thank you: 

ok one last thing: 

and I would like to hide this part die neuesten Beiträge(see attached aswell)

PenciDesign replied

Staff Reply

Hi,

If so, please try replace the code I sent to this code:

/**
 * Hide featured slider & featured boxes in next page
 */
if( ! function_exists( 'penci_hide_featured_slider_next_page' ) ) {
    function penci_hide_featured_slider_next_page( $data ) {
        $paged = get_query_var( 'paged', 1 );
        if( is_home() && $paged > 1 ) {
            return false;
        } else {
            return $data;
        }
    }
    add_filter( 'theme_mod_penci_featured_slider', 'penci_hide_featured_slider_next_page' );
}
if( ! function_exists( 'penci_hide_featured_boxes_next_page' ) ) {
    function penci_hide_featured_boxes_next_page( $data ) {
        $paged = get_query_var( 'paged', 1 );
        if( is_home() && $paged > 1 ) {
            return true;
        } else {
            return $data;
        }
    }
    add_filter( 'theme_mod_penci_home_hide_boxes', 'penci_hide_featured_boxes_next_page' );
}

Best Regards,

PenciDesign

berriesandpassion replied

Customer Reply

perfect it worked. And one last question. Can I hide the featured Boxes as well on the other sides? 

PenciDesign replied

Staff Reply

Hi,

To do that, please add more this code at the end of functions.php file - check this image:

/**
 * Hide featured slider in next page
 */
if( ! function_exists( 'penci_hide_featured_slider_next_page' ) ) {
    function penci_hide_featured_slider_next_page( $data ) {
        $paged = get_query_var( 'paged', 1 );
        if( is_home() && $paged > 1 ) {
            return false;
        } else {
            return $data;
        }
    }
    add_filter( 'theme_mod_penci_featured_slider', 'penci_hide_featured_slider_next_page' );
}

Best Regards,

PenciDesign

berriesandpassion started the conversation

Conversation Start

Hi i want the slider only on the HOME Page.  

So only on the first page. Is it possible to hide it on the other sites: https://by3wp5.myraidbox.de/page/2

best nina

Want to join this conversation or access attachments? Sign in first.