Login

To vote or comment, enter your email and we'll send a magic link

3

PHP code sample to show current page number please

completed

It would be nice if there were more samples of code we could just copy and paste.

I guess for hardcore users they can program stuff but I'm finding it difficult to follow the instructions.

I see lots of samples but the writer didn't say where to put the code on many pages.

How do we show the current page number only? Can you give a PHP example here please?

1 year ago

Comments (2)

To output the page number, you can currently use:

<?php echo FWP()->facet->pager_args['page']; ?>
1 year ago

Closing, there's a new section on the doc page:

https://facetwp.com/documentation/facets/facet-types/pager/

1 year ago