WordPress.org

Support

Support » Plugins and Hacks » if statement to check on what page your are to link different css

if statement to check on what page your are to link different css

  • Hi

    I am struggling to figure out how to check on what page I am with page navi.

    I want to use a different style sheet on the last page due to layout not looking to great currently – so to prevent just one post being displayed on the last page would be a alternative to that.

    I have tried

    <?php
    $paged = $wp_query->get( '4' );
    
    if ( ! $paged || $paged < 3 )
    {
       echo ('hallo'); // This is not a paginated page (or it's simply the first page of a paginated page/post)
    
    }
    else
    {
       // This is a paginated page.
       echo ('only showing on 4');//not sure if this is correct - was just page originally
    
    }
    ?>

    but this keeps on showing hello no matter what.. any help would be greatly appreciated!

    http://wordpress.org/extend/plugins/wp-pagenavi/

  • The topic ‘if statement to check on what page your are to link different css’ is closed to new replies.