Shop page pagination issue

Hey,
I’m facing an issue with the product pagination on my shop page. In some threads I read to make the pagination work I need to remove the looper provider from the code.
But according to my need, I’ve to add a looper provider to get my results.

  1. I’ve created a page whose name is “Blog” and I’ve set it to the shop page. (To make a pagination work)
  2. This page shows all the products as a result on this page.
  3. Now I want to show only those products whose “Taxonomy” is “Blog Article”.
  4. To get this result I added the looper provider and created a query for my page.
  5. ISSUE: After adding a looper provider the pagination has stopped working. I’m using the product pagination element of your theme.

    Could you please suggest to me the correct of doing my task?
    I just need a page with the name blog and it’ll show the products of a particular Taxonomy with pagination.

Hi Ketan,

Thanks for reaching out.
Can you please share the URL of the page along with the login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

NOTE: Please remember that you don’t need to add any Looper Provider to the Archive Layout.

Thanks

page url - https://ehob.founderscaffe.com/blog
The objective is to have a page named ‘blog’ that displays products categorized under a specific Taxonomy (blog article), complete with pagination. This is the main goal.

Hello Ketan,

To display the product of a specific category on the shop archive layout I would suggest you go to the layout -->set the condition where you have set the looper consumer. Please have a look at this screenshot for the conditions.

Please feel free to set the category as per your category.

Hope it helps
Thanks


by applying the this post (has term) conditions the products are visible but the pagination is still showing all the pages, and some blank pages also why?

pagination is still counting all the products how can i apply this post has term condition on pagination also?

Hello Ketan,

You are doing it incorrectly. Using the “Conditions and Assignment” will only hide away the items out of the 10 items that are returned by the WooCommerce loop on that page. If you want to exclusively display product items with a particular taxonomy, you can refer to this WooCommerce documentation instead:

Based on that article, you can change the operator from “NOT IN” to “IN” and specify the correct term.

Kindly let us know how it goes.

Thank you for your assistance; it’s working perfectly. One final detail: the products are now displaying, but I would like them to be ordered by their publication date instead of alphabetically.

Hi Ketan,

Glad that pagination is working now. To make the product ordered by the publish date, you need to add custom coding, which is beyond the scope of theme support. I would suggest you hire a developer who can assist you with the customization or you can avail of our newly launched service called One, where we answer the questions beyond normal theme support.

Alternatively, you can go through the following thread specifically pre_get_posts filter method.

Please remember that the above code will work if copied as it is and doesn’t conflict with any existing style.

Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.

We really do not provide support for custom codes, which means we can’t fix it in case it conflicts with something on your site, nor will we enhance it. On further customization should be directed to a third-party developer or you can avail of One, where we answer the questions beyond normal theme support.

Thanks