if statement to check on what page your are to link different css (1 post)

  1. cnever
    Posted 3 years ago #


    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

    $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)
       // 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!


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic