get_pagination on custom query

Posted in: Newspaper
Post count: 29

Hi!

I created a custom query and now I’m trying to integrate it with Newspaper layout. It almost done, I just couldn’t get the pagination counter right.

Looks like it reads from the whole posts query and returns the number of pages as if it wasn’t filtered.

So, how can I get this piece of code:

td_page_generator::get_pagination();

To read the custom query in $query var, as in this code:

echo paginate_links( array("current" => $paged, "total" => $query->max_num_pages) );

Thanks in advance!

Post count: 6535

HI

The pagination function uses the main query when generate the pagination numbers. As a reference you can have a look here: http://screencast.com/t/jvc0keM4 If you use a custom query for taxonomy page it’s possible to be needed some customization in order to achieve the desired result.

Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.