Group on front end

I was browsing the forum and saw a post from 2017 that was kind of related: has there been any examples or references for groups on a front end form? I’m currently using PODs to make custom post types and am using it’s form shortcode, but can do something custom if necessary, where I’m trying to apply groups during the creation of a post. Though I’d also like to filter the available groups to only those that the poster has access to. I’m trying to allow certain users to be able to make posts for any or all of their groups without needing backend/admin access. Just wanted to see if there was anything out there similar to this scenario before I dove in more trying to extend it in a custom plugin.

Posted in

Comments

5 responses to “Group on front end”

  1. You’re welcome!

  2. Thanks again for the reply, I’ll go over the API and see what I can do. Thanks for the tips and all!

  3. Hi Matt,

    Thanks for sharing your ideas.
    FYI, you might also find useful to check the post meta key groups-read when a post is restricted to a group, while the meta value for this should be the group id applied. The above perhaps could be implemented with a shortcode.
    If you haven’t already checked it, the Groups API is here:
    http://api.itthinx.com/groups/

    Cheers,
    George

  4. Thanks for the reply, George, I think that could help in some scenarios, I’m still playing around with ideas. I was kind of thinking of having a front end form that would let you assign the group (similar to how the backend posting works), so instead of a metabox for example it could be some form element. For example, I’m in group A, and I want to create a post from the front end, I want to be able to choose which group or groups this post would be assigned to (i.e., group A would be an option for me), then submit the entire form so the post is only visible to that group upon submission. The backend posting (admin dashboard) works great, just wanted to see if there was the option to not need to give users access to that and still get something similar to that group assignment box. I’m thinking I’ll have to do something via the API, but I need to explore it more.

  5. Hi Matt,

    Although I haven’t tried PODs myself, if PODs gives you the ability to add a form through a shortcode, then you could possibly restrict that shortcode with:
    [groups_member group="Advanced,Premium"]
    Only members of Advanced or Premium can see this.
    [/groups_member]
    [groups_non_member group="Advanced,Premium"]
    Only members of Advanced or Premium can see this.
    [/groups_non_member]
    FYI, the documentation links for the sh

    Another useful frontend tool for you might be:
    [groups_join group="X"]
    [groups_leave group="X"]
    They both generate buttons which on click will add/remove the current user to/from the group X indicated respectively.

    FYI, the documentation links for the shortcodes are here:
    http://docs.itthinx.com/document/groups/shortcodes/groups_member/
    http://docs.itthinx.com/document/groups/shortcodes/groups_non_member/
    http://docs.itthinx.com/document/groups/shortcodes/groups_join/
    http://docs.itthinx.com/document/groups/shortcodes/groups_leave/

    Merry Christmas,
    George

Share