WordPress.org

Support

Support » Plugins and Hacks » [Resolved] template tag for buddypress group event

[Resolved] template tag for buddypress group event

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hiya,

    Are you using BuddyPress by any chance? If so, are all events attached to a group, or created globally?

    Thanks

    nowton
    Participant

    @nowton

    Yeah, this is a BP installation. Some events are created by our client, some are created by BP groups. We’d like to keep it that way, if possible.

    caimin_nwl
    NetWebLogic Support

    @caimin_nwl

    So, just to clarify, what you need is the ability to display a message when showing a group organized event?

    nowton
    Participant

    @nowton

    Well, I currently list the organizer using the appropriate tag. Events Manager chooses to display the user, not the group, even though the group owns the event.

    angelo_nwl
    NetWebLogic Support

    @angelo_nwl

    sorry, can I know what do you mean by “show that an event is being organized by a group” ? Is that you wanted to group events by buddypress group or atleast show the group name in the events list?

    nowton
    Participant

    @nowton

    Our (single event) template now shows: organized by ‘user’, both for user events and group events. We’d like to show ‘groupname’ instead of ‘user’ in the instances of a group event.

    Hiya,

    In your template you need to get the ‘group_id’ property of the event object. If that has a value, it means that the event belongs to a group.

    $EM_Event->group_id

    From there, you can grab the name of the group via BuddyPress using that group ID.

    Cheers

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] template tag for buddypress group event’ is closed to new replies.