Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › Stores list on different page causing pagination issues
Tagged: wcfm, wcfm stores list, wcfm stores list pagination
- This topic has 1 reply, 2 voices, and was last updated 4 years, 7 months ago by Sarmistha Chakraborty.
- AuthorPosts
- May 6, 2020 at 5:14 am #127202syedaliamaarParticipant
Hi, I used the ‘Stores list’ shortcode on 2 pages.
1. Stores list page https://www.thejurassiccoast.co/stores/
2. On homepage https://www.thejurassiccoast.coOn page 1, it is showing correctly.
But on the homepage I cannot go to next page of the stores list. When I click 2 (next page), it refreshes the page. I know the issue but can’t fix it.
The issue is that, the pagination buttons have this link https://www.thejurassiccoast.co/page/2/ instead of https://www.thejurassiccoast.co/stores/page/2So we cannot use the ‘stores list’ on any other page.
Please let me know how to fix it.Thanks
- May 6, 2020 at 10:13 pm #127610Sarmistha ChakrabortyMember
Hello,
By-default “Store list” pagination does not work in home page, But “[wcfm_stores]” this will work in other pages with pagination.
For your requirement you can add this code in your theme’s functions.php, hope it will meet your requirement –
add_filter('wcfm_store_list_pagination_args',function($pagination_args){ if ( is_home() || is_front_page() ) { $pagination_args['base'] = 'https://www.thejurassiccoast.co/stores/page/%#%/'; } return $pagination_args; },10);
Thanks.
- AuthorPosts
- You must be logged in to reply to this topic.