Tagged: bp_members_loop
I have simple index.php like below, but the main page is not showing the buddypress members.
Any hints welcome.
(I have tried the chatgpt standard hints)<?php get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <article> <div class="entry-content"> <?php the_content();?> </div> </article> <?php endwhile; endif; ?> <?php if ( is_home() && function_exists( 'bp_members_loop' ) ) : ?> <div class="members-loop"> <?php bp_members_loop(); ?> </div> <?php endif; ?> </main><!-- #main --> </div><!-- #primary --> <?php get_footer();
Hi,
Welcome to BuddyDev support forums.The code you are using does not create a proper members loop.
Please take a look at this file
https://github.com/buddypress/buddypress/blob/11.2.0/src/bp-templates/bp-legacy/buddypress/members/members-loop.phpYou should replace this part from your file
<div class="members-loop"> <?php bp_members_loop(); ?> </div>
with the code from line 23 to 146 o the linked file and then modify as you need.
Hope that helps.
Regards
Brajesh
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘ [Resolved] bp_members_loop function’ is closed to new replies.
This topic is: resolved