Pagination with get_posts seems to work but links not showing

Your $paged variable on the first is set in the main query. And there is just one page, because it is a page. The get_posts() calls don’t affect that. So the number of all available pages is never higher than the current page, and you cannot get a next page link.

Solution: filter pre_get_posts and set your post types here.

Leave a Comment