• Resolved uglyfrog10

    (@uglyfrog10)


    I’m using groups to set product pages to visible/hidden. The default is to hide the product unless a group is specified for that product. So the issue is, I want people not logged in to also see products, so I need a group for that. To create a group, I need a role to assign to the group. So I’m looking for an anonymous role or something that I can assign to a group that includes users not logged in.

    Any suggestions?

    https://www.ads-software.com/plugins/groups/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey uglyfrog10, I’m having this same issue but with portfolio posts. I’ve been hacking away at it for weeks now with no luck. I still don’t know how to target the non members because like you said there is no role for a guest built in. There is definitely a need for this seeing how logically if you were to hide something from guests, you might want to be able to hide it from members and show it to guests where right now you have hide it from guests or show it to everyone. If you find the answer will you please post it here? I’ll do the same since our answers should be really similar and this has been asked several times on here with no answer or explanation to how it should be implemented so it will probably help people out in the future .
    Thanks

    Plugin Author itthinx

    (@itthinx)

    Hi,

    You can identify non-members by checking for their membership with the Registered group.

    On this page https://www.itthinx.com/documentation/groups/api/examples/ you will find an example on how to check if a user belongs to a “Foobar” group. Exchange “Foobar” with “Registered” and you can work with $is_a_member – it will be true for members and false for those who are not.

    Cheers

    Plugin Author itthinx

    (@itthinx)

    I’ve corrected my previous comment, the conditional statement should not be negated.

    Hi..

    Where i need to use that code to display product who are not logged in user

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add Anonymous User (not logged in) to Group’ is closed to new replies.