• Hello, I have a wordpress installation on my client’s page https://www.businessfinancestore.com/, but I have a slider on the front page and when I search for the older posts, the slider is still there.

    I tried is_home and also is_frontpage, but it does not work. It is still displaying when I get to page 2 (https://www.businessfinancestore.com/page/2/).

    If I was not using permalinks, I could use the ?paged=2 variable, but since I am using the permalinks I would like to know how I can prevent this from displaying.

    Thanks in advance for any help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can check what page your on using $paged = $wp_query->query_vars[ ‘paged’ ];

    $paged = $wp_query->query_vars[ 'paged' ];
    
        if ( have_posts () ) :
    
            if ( $paged < 2 ) {
                // Slider code here
            }
            while ( have_posts () ) : the_post ();
                // Continue with the loop
    Thread Starter christiang69

    (@christiang69)

    thanks, this works perfectly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Page 2 modifications’ is closed to new replies.