Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WC Marketplace › Showing Products on certain pages
- This topic has 5 replies, 2 voices, and was last updated 4 years, 9 months ago by
Sarmistha Chakraborty.
- AuthorPosts
- May 13, 2020 at 8:54 pm #130513
sam-7746
ParticipantHello!
This might be a simple question but I was wondering if I could get some help with this. Our team is new to this Marketplace.
So we have a main store page that sells products and then a marketplace page where we want to sell from different vendors. So far we only have one vendor setup called Flying Bison. Is there a way to only show Flying Bison products on their vendor page and NOT the main sites store page? We can’t seem to figure it out. We would really appreciate some help here.
Thank you! 🙂
- May 14, 2020 at 1:53 pm #130878
Sarmistha Chakraborty
MemberHello,
If you want to show only admin’s products in WooCommerce shop page( main store page),not any vendor’s products –
function custom_pre_get_posts_query( $query ) { if ( !wcfm_is_store_page() ) { $query->set( 'author', 1 ); } } add_action( 'woocommerce_product_query', 'custom_pre_get_posts_query' );
Try this code to your child theme’s functions.php
Thanks.
- May 15, 2020 at 9:08 pm #131461
sam-7746
ParticipantHello! Thank you for the help! Really appreciated.
I added that to our themes functions.php and it did not seem to hide a test product from the main store page. Would you be able to direct us more?
- May 16, 2020 at 1:22 pm #131737
Sarmistha Chakraborty
MemberHello,
Is “Test product” created by your vendor?
Can you provide us your site url with admin access? then we can check your site and guide you properly.(Set as private reply)Thanks.
- May 20, 2020 at 7:37 pm #133566
sam-7746
ParticipantThis reply has been marked as private. - May 22, 2020 at 12:43 pm #134093
Sarmistha Chakraborty
MemberThis reply has been marked as private.
- AuthorPosts
- You must be logged in to reply to this topic.