Add field to Groups Directory

Hi there,

I added a step in the group creation using http://codex.buddypress.org/developer-docs/group-extension-api/. I then added 2 of my new fields to the group header, but what I would like to do now is to add one of these to the group directory. I looked at how it is done in the Group Review plugin, and it's somewhat complicated looking, so I was just wondering if you knew of an easy way to add to the directory. It's just a date I want to add.

Thanks.

  • Mason
    • DEV MAN’s Sidekick

    Hiya Fondeli,

    So you're wanting to add your new custom group field to the listings on the group page?

    I've not attempted something like this and am not sure other than follow the method you see layed out in the Group Review plugin.

    Anyone have any tips for Fondeli?

    thanks!

  • Fondeli
    • The Bug Hunter

    Hi Mason,

    Well I've taken another look at this and I've found something that half does the job. I have a function my_display with my output. And this add_action('bp_group_header_meta', 'my_display', 1); adds it to the group header. And I have found this add_action( 'bp_directory_groups_actions', 'my_display' ); and it does add to the group directory, but it only sends what I have actually written and not the array.

    What I mean is I have :
    Sign up by:< ?php echo groups_get_groupmeta($bp->groups->current_group->id, 'bpgf_signup'); ? >
    and Sign up by: is displaying but not the actual date.

    Would you have any idea how I could get around this?

    Thanks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.