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?

2 years ago

Comments (2)

To output the page number, you can currently use:

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

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

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

2 years ago