Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST

Due to the decrease in our staff due to vacations, our response time may be longer.

Be sure we're doing our best to manage your topic as soon as possible.

Update Group Members List Item Hooks


Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Sam
    • 18 Topics
    • 41 Posts

    The Grimlock BuddyPress plugin contains templates that render list items in ‘cards’. An example is viewing the members who belong to a BuddyPress group, or viewing the members directory.

    The Grimlock plugin, places the <?php do_action( 'bp_group_members_list_item' ); ?> call outside the card, meaning there are no hooks for third party plugins to display additional content inside the members card.

    Additionally, the placement of the do_action function call is contrary to the default BuddyPress templates. BuddyPress places the do_action function call before list item actions are displayed.

    I propose moving the do_action call to be inside the card, before list item actions are output, to be inline with default BuddyPress behaviour, or adding a new do_action call to allow proper plugin and theme integration.

    This change would make the template inline with the Grimlock members directory template, which place do_action( 'bp_directory_members_item' ); inside the card.

    An excerpt of the template is below:

    <li class="bp-card-list__item bp-card-list--members__item has-post-thumbnail element-animated fade-in short element-animated-delay element-animated-both">
        <div class="card">
            <div class="card-img">
                <a href="<?php bp_group_member_domain(); ?>">
                    <?php bp_group_member_avatar_thumb( 'type=full' ); ?>
            </div> <!-- .card-img -->
            <div class="card-body pt-1 pb-4 pl-2 pr-2">
                <header class="card-body-header entry-header clearfix">
                    <h2 class="entry-title">
                        <?php bp_group_member_link(); ?>
                    </h2> <!-- .entry-title -->
                </header> <!-- .card-body-header -->
                <div class="card-body-meta">
                    <div class="bp-member-xprofile-custom-fields"><?php do_action( 'grimlock_buddypress_member_xprofile_custom_fields' ); ?></div> <!-- .bp-member-xprofile-custom-fields -->
                    <div class="card-body-activity">
                        $group_member_joined_since_args = array(
                            'relative' => false,
                        ); ?>
                        <span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_member_joined_since( $group_member_joined_since_args ) ); ?>"><?php bp_group_member_joined_since(); ?></span>
                    </div><!-- .card-body-activity -->
                </div> <!-- .card-body-meta -->
                <?php if ( bp_is_active( 'friends' ) ) : ?>
                    <div class="card-body-actions action">
                        <?php bp_add_friend_button( bp_get_group_member_id(), bp_get_group_member_is_friend() ); ?>
                        <?php do_action( 'bp_group_members_list_item_action' ); ?>
                    </div> <!-- .card-body-actions -->
                <?php endif; ?>
            </div> <!-- .card-body -->
        </div> <!-- .card -->
        <?php do_action( 'bp_group_members_list_item' ); ?>
    </li> <!-- .bp-card-list__item -->
    Themosaurus Support
    • 1 Topics
    • 429 Posts

    Hi Sam,

    Thank you for the feedback!

    Your suggestion makes sense, we will make sure to position the bp_group_members_list_item hook before the item actions in the next update of Grimlock for BuddyPress.

    Unfortunately we don’t know when the next update will come out so we can’t give you an ETA on that. In the meantime, if you are working with a theme you can simply override that template by copying it in buddypress/groups/single/members.php within your theme. This way you’ll be able to move the hook while waiting for the update, and even add extra stuff in the template should you need to.

    Best regards,

    • 18 Topics
    • 41 Posts

    Thanks Jason, that would be great.

    I’ve also see that <?php do_action( 'bp_directory_members_item' ); ?> is called twice within grimlock-buddypress/templates/members/members-loop.php, once on line #34 and again on line #58.

    It looks like the call on #34 is meant to be for a different action.


    Themosaurus Support
    • 1 Topics
    • 429 Posts

    Hi Sam,

    Noted! We’ll take a look at that one too when we work on the next update.

    Best regards,

    Themosaurus Support
    • 0 Topics
    • 6297 Posts

    Hi Sam,

    We have just released a new update of Grimlock for BuddyPress. Updating this plugin to the latest version should fix this issue.

    After the update, the problem should now be fixed. However, you might still be seeing the issue because your browser cache is showing you an older version of the page (browsers do that to load pages faster). To see that the issue is resolved you will need to empty your browser cache and reload the page. If you want to read more on what browser cache is and how to clear it, here is an article that might help you: How to Clear Internet Cache in Every Major Browser.

    Kindest regards,

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Troubleshooting Demo Imports

You're trying to setup your theme but you're experiencing errors when importing the demo content? Or you've just followed the setup guide but your website doesn't look exactly like our demo? These are common issues for which you can find easy and quick fixes.

Happy With our Support So Far?

Feel free to review our theme on Themeforest! It helps us making our products more known to new potential customers, which allow us more time to improve the quality and develop new features. #SharingIsCaring ❤️

Discover MatchPress

Skip • Like • Super-Like

Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.

Setup Your Cera or Gwangi powered Community Website and Turn it into an iOS and Android App

15% discount for Cera users

To unleash the full power of your Cera or Gwangi theme, we have partnered with the Zipline team. Your community website can now be fully setup and turned into your very own custom app for iOS and Android.

Whether you've newly acquired the theme or already got your site up and running, Zipline got you covered. And we got you an incredible discount.

Holiday, Weather & Festive effects
to pimp your WordPress Site