Allow multiple groups segregated to diff tables on page

HomeForumsFeature RequestsOther Feature Requests and Plugin IdeasAllow multiple groups segregated to diff tables on page

Viewing 0 reply threads
  • Author
    • #14256
      Dawn Weber

      Our organization has 2 groups of events
      – ones that we sponsor
      – community events that we like to share but do not sponsor

      I have been looking at the Groups extension and am not sure if we can do what I want to do.

      I want to be able to show all on one page:

      Text info at top of page

      Group 1 – Sponsored events

      Group 2 – Community Events

      It seems like I might be able to do this with shortcodes using the group filter
      Are you able to confirm?

      Thank you!

      January 30, 2017 at 9:16 AM #14253 REPLY

      Stephen Sherrard

      It’s not really designed for that. While you can put two different shortcodes on the same page, one for each group, and it will display those just fine in two sections, the problem arises when you click on the “view and signup” link for any task. At that point, the specific sheet id is added to the URL, and both shortcodes are going to try to display that sheet. However, since that sheet belongs to only one of the two groups, you’ll get a “sheet not found” message for the shortcode output of the other group. You could also use the Customizer extension in this case to change or disable the text for that specific error message, but the error box will still show (would have to use CSS or javascript to hide it).

      Since the two shortcodes on a page are not aware of each other and not aware of the content of each other (the way WordPress shortcodes work), the only thing I would be able to do via programming would be to create a new option for the groups plugin to redirect the “view and signup” links (for viewing single sheets) to a different page that has only one generic (default) shortcode on it. Right now there is an option to redirect for the sign-up form itself, but not for viewing an individual sheet. Those view & sign-up links are actually generated by the main plugin (not the Groups plugin), so would have to hook into those links in the main plugin from the groups plugin to alter those links and redirect them to a different page. Not sure if that’s the best solution or not. The other possible, but much more complex, solution would be to use some javascript/jquery to create pop-up sheet details and sign-up forms, similar to what is available on the Calendar view extension. Again, would have to intercept those links, but this time it could be done with jQuery.

      You could add either of those to the feature requests section, and it’s something I will certainly consider. Right now, though, your best bet is to have the two groups on their own pages, with just one shortcode per page. You could also still have a main volunteer page that shows all the sheets, and it will have a Groups column (after you install the groups plugin) that shows which groups each sheet belongs to. The main purpose of the Groups plugin was to create a sort of “categories” for the groups, but not to show multiple categories on one page (main volunteer page shows them all). The newest update also integrates with other plugins to allow you to restrict access by certain users based on group membership (using either BuddyPress or the WordPress Groups plugin).

Viewing 0 reply threads
  • You must be logged in to reply to this topic.