admin管理员组

文章数量:1291217

This question already exists: wp_query and get_posts() in widget / own code [closed] Closed 3 years ago.

I have two different widgets on one of my pages. They both display posts, but from different categories. One widget has pagination. Now when I switch to another page, the 2nd widget doesn't display anything. I suppose this is due to some pre-filtering done on the new page, resulting in no posts of the 2nd widget's target category being in the post list.

Like e.g. all posts from the 2nd widget's category would be on page 1, so they are not available on page 2 since the post query/fetch WP does ahead of loading my page has already skipped them.

本文标签: paginationtemplate with multiple post loops for multiple widgets