Site logo

Archived topic

woocommerce shortcode pagination not working

5 replies · Started by johnaps on May 8, 2021

Viewing posts 1–6 of 6

Hello!

I am using this shortcode [products on_sale="true" limit="-1" paginate="true"]
and i cant get the pagination to work!! Do you have any idea as to why?

Thank you in advance!

Hi there,

to the best of my knowledge the Pagination attribute only applies if the shortcode is being used in a Shop ( product archive ) not a static page. In a page setting, Shortcodes are only used for displaying static content.

You would need to look for a plugin or custom development to add that capability.

Ηello David!!
Thank you very much for the info!
I created a new product category and added a product in it... after that i created and element with gp and inserted the above shortcode that i sent you while enabling execute shortcode option in it...
I tried different hook positions like generate_after_archive_title, generate_after_archive_description... but i got nothing, as if the shortcode wasnt even being loaded....
I tried all this based on your suggestion that the pagination would work on product categories but it didnt even get loaded...
Maybe you have any more suggestions i could try for this situation?
Thank you very much David!

So how would i use this in conjuction with onsale shortcode?

When i inserted the onsale shortcode in product categories as David suggested, i got no loading of the shortcode...
Where and how should i use onsale shortcode & woo_pagination()?

Well here we go - add this shortcode to you a static page:

[sale_products per_page="2" paginate="true"]

You may need to Regenerate the lookup tables in Woocommerce > Status > Tools

This archived topic is closed to new replies.