Title: Content based on Groups
Last modified: February 15, 2019

---

# Content based on Groups

 *  Resolved [sandykg](https://wordpress.org/support/users/sandykg/)
 * (@sandykg)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/content-based-on-groups/)
 * Hi I am looking to do the following:
 * “Show this message” to visitors and registered users only
 * “Show this unique message” to users belonging to GroupA
 * Using the shortcodes I’ve been able to
    “show this message” to visitors however
   when registered users view the content its blank.
 * “Show this unique message” works with users belonging to GroupA
 * How can edit the codes so that “Show this message” works both for visitors (not
   logged in) and registered users also.
 * Code I used
 *     ```
       [groups_member group=“Magazine”]
       Welcome
       [/groups_member]
   
       [groups_non_member group="Registered"]
       Already a Subscriber?
       [/groups_non_member]
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [gtsiokos](https://wordpress.org/support/users/gtsiokos/)
 * (@gtsiokos)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/content-based-on-groups/#post-11222587)
 * Hi Sandy,
 * You can use the same message both for registered users and visitors but you need
   to use two different shortcode blocks:
 * [groups_member group=”Registered”]
    Unique message for registered users [/groups_non_member]
 * [groups_non_member group=”Registered”]
    Unique message for visitors [/groups_non_member]
 * Registered users and visitors cannot be combined using one shortcode block because
   a registered user belongs to at least one group, while a visitor doesn’t belong
   to any groups.
 * Kind regards,
    George
 *  Plugin Author [Kento](https://wordpress.org/support/users/proaktion/)
 * (@proaktion)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/content-based-on-groups/#post-11282175)
 * Hey there,
 * I see slanted double quotes in the examples, usually these don’t work when you
   try to pass a parameter to a shortcode so you should make sure that you’re using
   straight double quotes:
 * OK : `"`
    NOT OK: `”`
 *     ```
       [groups_member group="Registered"]
       Shown to registered users (with an account and logged in) only.
       [/groups_member]
       ```
   
 * Cheers

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Content based on Groups’ is closed to new replies.

 * ![](https://ps.w.org/groups/assets/icon-256x256.png?rev=983146)
 * [Groups](https://wordpress.org/plugins/groups/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/groups/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/groups/)
 * [Active Topics](https://wordpress.org/support/plugin/groups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/groups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/groups/reviews/)

## Tags

 * [content restriction](https://wordpress.org/support/topic-tag/content-restriction/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [view](https://wordpress.org/support/topic-tag/view/)

 * 2 replies
 * 3 participants
 * Last reply from: [Kento](https://wordpress.org/support/users/proaktion/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/content-based-on-groups/#post-11282175)
 * Status: resolved