Add friend button disappears because of bp_has_members() loop
-
Hi there,
On a profile I have a separate element to get the cover image for a member. For some reason because of the code below the “Add friend” and “Public Message” buttons disappear. When I remove only this code and reload the page, the buttons are there.
Anybody an idea why this code is in conflict with those buttons?
<?php if (bp_has_members()) : ?> <?php while (bp_members()) : bp_the_member();?> <?php // Get the Cover Image $member_cover_image_url = bp_attachments_get_attachment('url', array( 'object_dir' => 'members', 'item_id' => bp_displayed_user_id(), )); ?> <img src="<?php echo $member_cover_image_url; ?>"> <?php endwhile; ?> <?php endif; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.