Title: [Plugin: Groups] Shortcode boolean
Last modified: August 20, 2016

---

# [Plugin: Groups] Shortcode boolean

 *  Resolved [jeffryf](https://wordpress.org/support/users/jeffryf/)
 * (@jeffryf)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-groups-shortcode-boolean/)
 * I need to perform some simple boolean logic with shortcodes–specifically [group_member
   group=”Group Name”].
 * I have 5 products: 2 simple, single-purchase products and 3 subscription products.
   I’ve assigned each a unique Group identity. I want each purchase to have a distinct
   message on the landing page after purchase.
 * One subscription is a follow-on to one of the two simple products. So when the
   customer “upgrades,” she is in two Group: one of the simple product Groups and
   the subscription Group.
 * So…
 * Products 1, 2, 3, 4, 5
 * Corresponding Groups A, B, C, D, E
 * I need to be able to designate (A & not C) and (A & C) for the shortcode.
 * The [group_member group=”Group Name”] shortcode works perfectly for the 2 simple
   products and 2 of the subscriptions, but when someone purchases the follow-on
   product, they see both the simple product message and the subscription message.
 * [http://wordpress.org/extend/plugins/groups/](http://wordpress.org/extend/plugins/groups/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [itthinx](https://wordpress.org/support/users/itthinx/)
 * (@itthinx)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-groups-shortcode-boolean/#post-2976203)
 * Member of A but not of C can be done like this:
 *     ```
       [groups_member group="A"]
       [groups_non_member group="C"]
       You are a member of group A but you're not in group C.
       [/groups_non_member]
       [/groups_member]
       ```
   
 * Member of A and C cannot be expressed currently and nesting the same shortcode
   within itself unfortunately isn’t an option due to [limitations](http://codex.wordpress.org/Shortcode_API#Nested_Shortcodes)
   of WordPress’ shortcode parser.
 * But a solution to the above would be to allow unary negation and binary conjunction
   of group names (disjunction is already implemented) within the shortcodes’ group
   attribute – if that were implemented, the shortcodes could be used interchangeably.
   I see the worth of it and am adding this as a feature request.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Groups] Shortcode boolean’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [itthinx](https://wordpress.org/support/users/itthinx/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-groups-shortcode-boolean/#post-2976203)
 * Status: resolved