Archived topic
Queryloop for taxonomies with paging
10 replies · Started by Front Digit on April 7, 2023
Hi,
I am creating a custom front page using content template where have created three different containers. In one of the container I have added a query loop with below Parameters
Select Post Type - Posts
Posts Per Page - 8
Taxonomies - Tags
Select Terms. - Given Term Slug
I have also added paging to the loop. But when I see the output, it display all posts attached to the tag. Neither it restrict to 8 posts nor it displays paging. Kindly suggest.
Hi there,
Can I see the front page?
Sure,
Please let me know if you need more details
Thanks
Hi there,
are you using a GP Element Content Template?
Yes David, I am using GP Element Content Template.
Thanks
Ravi
Hi Ravi,
You shouldn't need to use a Content Template for that page.
Just add the Query Loop and the other Blocks directly to the page itself.
Hi,
But the problem is, "Post Per Page" is not working for Taxonomies. Even if I create without Content Template.
Thanks
Ravi
Hi,
One more thing I noticed is, No results showing (0 results found) when I add any specific category or tag to "Select Terms".
But if I see the preview, I could see the results.
Can you provide admin login credentials so we can take a closer look at what's causing these issues?
Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Hi Fernando,
Shared via private information.
Thank you
Ravi.
You can't use the content template and a static home page for this purpose. The main query for that page won't handle Post Per Page or Pagination.
You either:
1. edit the page as Fernando suggested
or
2. use a Block Element - Loop template with a home page set to display the latest posts.