Tell us what you are trying to do?
I want to exclude toolset access protected products from viewing in the shop listings (standard woocommerce loops).
I dont know how i can exclude it, now it displays only in the listings, the product is protected. is it possible to exclude this products from the woocommerce listenings?
Product X is toolset access protected
Product Y is not
So both are displayed at the product-category page (standard woocommerce) the product itsef is protected. but should also not displayed in the product-category archive.
Maybe i am on the wrong way. Thank you and kind regards.
Is there any documentation that you are following?
no 🙂
Is there a similar example that we can see?
no 🙂
What is the link to your site?
Its in development now. no access possible.
Hi,
Thank you for contacting us and I'd be happy to assist.
Based on what you've shared, I'll assume that you're using the Access post groups, to limit access to the specific products.
The access post group restrictions are not automatically applied to archive pages, like shop or product category archive pages.
To extend that restriction to your archive pages, you'll need a custom shortcode that can check whether the current post should be accessible to the current user or not and return '1' if it is allowed.
Example code snippet available at:
hidden link
After that, you can wrap the output of your archive loop items within a conditional check that checks the value of this shortcode and only shows the post/result, if the value is equal to '1'.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
My issue is resolved now. Thank you! Great support!