Hiding public content from logged in Group

So here’s the issue:

I would like to have certain products available in a WooCommerce store to consumers/non-logged in/guest users, but when a user logs in while belonging to a B2B group, the public products would become hidden from them.

So basically, I would like to hide public content for a specific group. Is this doable with Groups?

Thanks in advance!

Posted in

Comments

3 responses to “Hiding public content from logged in Group”

  1. Eugen Bleck Avatar
    Eugen Bleck

    Hi there Mikael,

    

Happy new year! I trust you are well and safe!

    Thank you for reaching out and for asking your question. Yes, it is very possible to hide public content for a specific group. This can be done with the groups’ plugin by the use of shortcodes or blocks. Please visit the links below to read more.

    * http://docs.itthinx.com/document/groups/blocks/
    * http://docs.itthinx.com/document/groups/shortcodes/groups_non_member/

    For instance, assume you have the following text;Special TEXT, which you would only want visible to the general public but not to any logged-in user. You could implement this using [groups_non_member][/groups_non_member] shortcode.

    [groups_non_member group="Registered"]
    Special TEXT
    [/groups_non_member]

    STAY SAFE and I wish you a very fine and productive day ahead!
    
Kind regards,

    Eugen.

    1. Thank you for your response!

      Would it also be possible to apply this logic to content, like pages, products, posts, etc?

      Grateful for your help!

      1. Eugen Bleck Avatar
        Eugen Bleck

        Hi Mikael,

        With the current version of Groups, this isn’t possible. The shortcode and blocks would work for content only.

        However, I’ll go ahead and share this request with the dev team and keep you updated.

        Kind regards,
        Eugen.

Share