Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Groups & Staffs › how to disable (or make private) vendor-groups page
Tagged: disable, groups, page, vendor, vendor-groups
- This topic has 8 replies, 3 voices, and was last updated 5 years, 1 month ago by system.
- AuthorPosts
- October 20, 2019 at 10:18 am #87771lewisParticipant
Hi 🙂
i would like to know if it’s possible to disable vendor-groups page (at mydomain.com/vendor-groups/)
if not, would it be at least possible to make it private, i don’t want it to be publicthanks for your help wcfm lovers :p
- October 23, 2019 at 9:57 am #88369WCFM ForumMember
Hi,
Well, this is actually private, no one have any idea about this page or it’s not even by default linked anywhere in frontend.
As Admin, you only know about this and if you add this link publicly in frontend then only users will able to access this.
Thank You
- October 24, 2019 at 5:36 am #88732lewisParticipant
Hi,
Thanks for taking time to respond to me.
That’s what I thought at first, but then I took the time to test it in “private browsing” and that’s where I saw that even without connection, everyone has access to this page . I know that technically the page has no connection anywhere, but search engines could index it. The best would be to have the option of removing it or making it private I think ..it’s even the case with your demo: https://wcfmmp.wcfmdemos.com/vendor-groups/
I am not connected and I can see publicly that you have 3 groups:
Gratis, Primium and gold.Would it be possible to help me making it more private?
Thanks 🙂 - November 5, 2019 at 8:06 am #90682systemParticipant
+1
I need this too.
Our B2B marketplace need hide the (Our Customers)vendor’s info for business safty requirement.
Most B2B Customers(as vendor role in marketplace) require to not public theirs info to public.I write an additional action to disable these links for no-admin now.
I hope there will be a option in backend to disable to vendor’s list page and shop page in wcfm-u or wcfm, or just use a shortcode page endpoint hold it for free usage.
You code is great, Hope you to be better.
Thanks. - November 7, 2019 at 7:43 am #91232systemParticipant
I have thinked out a proccess to disable all vendor’s info to public frontend and vendor’s role:
1. disable and hide store sidebar, vendor sidebar and vendor’s info fields(name/tel/email/address/etc.) at marketplace settings & store settings & Capability settings.
2. use this free plugin( https://wordpress.org/plugins/wp-widget-disable/ ) to disable all wcfm widgets(marketplace & store & vendor).
3. use remove_shortcode() function as following code in theme’s functions.php :
// —————-
add_action( ‘init’, ‘remove_wcfm_shortcodes’,9999 );
function remove_wcfm_shortcodes() {
remove_shortcode( ‘wcfm_store_info’ );
remove_shortcode( ‘wcfm_inquiry’ );
remove_shortcode( ‘wcfm_follow’ );
remove_shortcode( ‘wcfm_store_fb_feed’ );
remove_shortcode( ‘wcfm_store_twitter_feed’ );
remove_shortcode( ‘wcfm_stores’ );
remove_shortcode( ‘wcfm_store_hours’ );
}
// —————-
4. disable all endpoint begin with /store/ and /vendor-groups/ links.I think it will be work and I am trying the step 4 for now.
hope it is useful for you and another b2b users.
- November 12, 2019 at 9:14 am #91898WCFM ForumMember
HI,
i would like to know if it’s possible to disable vendor-groups page (at mydomain.com/vendor-groups/)
if not, would it be at least possible to make it private, i don’t want it to be public– Please add this code to your site for the purpose-
add_action('template_redirect', function( $template ) { if( is_post_type_archive( 'wcfm_vendor_groups' ) ) { wp_safe_redirect( get_permalink( wc_get_page_id( 'shop' ) ) ); } return $template; }, 100 );
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/Thank You
- November 14, 2019 at 8:33 am #92241systemParticipant
the code for the shortcode is to disable the vendor’s info to public, not to disable the vendor-groups.
here is my code to disable the vendor-groups endpoints :
// ====================
//diable wcfm endpoints : store, vendor-groups
$current_url = ( is_ssl() ? ‘https://’ : ‘http://’ ) . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’];
if( stripos($current_url, home_url(‘store/’)) === 0 or stripos($current_url, home_url(‘vendor-groups/’)) === 0 ) {
if ( wp_redirect( home_url() ) ) {
exit;
}
}// ====================
total proccess to disable all vendor’s info to public frontend and vendor’s role:
1. disable and hide store sidebar, vendor sidebar and vendor’s info fields(name/tel/email/address/etc.) at marketplace settings & store settings & Capability settings.
2. use this free plugin( https://wordpress.org/plugins/wp-widget-disable/ ) to disable all wcfm widgets(marketplace & store & vendor).
3. use remove_shortcode() function as following code in theme’s functions.php :
// —————-
add_action( ‘init’, ‘remove_wcfm_shortcodes’,9999 );
function remove_wcfm_shortcodes() {
remove_shortcode( ‘wcfm_store_info’ );
remove_shortcode( ‘wcfm_inquiry’ );
remove_shortcode( ‘wcfm_follow’ );
remove_shortcode( ‘wcfm_store_fb_feed’ );
remove_shortcode( ‘wcfm_store_twitter_feed’ );
remove_shortcode( ‘wcfm_stores’ );
remove_shortcode( ‘wcfm_store_hours’ );
}
// —————-
4. disable all endpoint begin with /store/ and /vendor-groups/ links.
//diable wcfm endpoints : store, vendor-groups
// —————-
$current_url = ( is_ssl() ? ‘https://’ : ‘http://’ ) . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’];
if( stripos($current_url, home_url(‘store/’)) === 0 or stripos($current_url, home_url(‘vendor-groups/’)) === 0 ) {
if ( wp_redirect( home_url() ) ) {
exit;
}
}
// —————-
hope it is useful for you and another b2b users. - November 14, 2019 at 8:45 am #92242systemParticipant
plus last post :
not use wild domain settings in your wordpress site.
you need add all available domains in your wordpress site(like: domain.com http://www.domain.com sub.domain.com) to the $current_url conditions.
if some domains pass the condition ( stripos($current_url, home_url(‘vendor-groups/’)) === 0 ) , the code will be useless!
- AuthorPosts
- The topic ‘how to disable (or make private) vendor-groups page’ is closed to new replies.