Forums Forums Search & Filter Pro Check events pagination page number

Viewing 7 posts - 1 through 7 (of 7 total)
  • Anonymous
    #231387

    Hello. There is a way to check in my php template if we are on the first pagination page, when event pagination is activated?

    Here is my events page link: http://www.pminetwork.test.polimi.it/events/

    In a standard page I used the WordPress get_query_var(‘paged’) function.
    Thank you.

    Trevor
    #231454

    Does it appear if you edit the template and add this code:

    $sf_current_query = $searchandfilter->get(334)->current_query();
    echo '<pre>';
    print_r($sf_current_query->get_array());
    echo '</pre>';

    (this will print an array to the page)

    Anonymous
    #231456

    Sorry I didn’t understand… I need to check if (are we on page 1)… I don’t need to print the page number!

    Trevor
    #231462

    $query->query['paged']

    Would normally give you the page number also.

    Anonymous
    #231466

    I tried like this:

    $sf_current_query = $searchandfilter->get(334)->current_query();
          print_r($sf_current_query->get_query_var('paged'));

    but I have an error…

    Anonymous
    #231468

    Ok I am really sorry. I figured out that the page is not using the search&filter query, but a query by another plugin. And I always have page number 1 if I use

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
          if(1 == $paged) {

    Anyway it is not to you to solve this.

    Trevor
    #231470

    Ah, OK.

Viewing 7 posts - 1 through 7 (of 7 total)