bp groups loop signs out user?!
-
I have this weird bug: When I try to retrieve all of the current users’ groups, not only are just the public groups displayed, it also seems like the user is half signed out. Although the current username is still displayed in the header, the wp admin bar shows a sign-in button (as shown in the picture here). Also, as said before, only public groups of the user are displayed.
This is my Code:
<?php get_header(); $current_user = get_current_user_id(); $args = array( 'user_id' => $current_user ); ?> <div id="primary" class="content-area container"> <main id="main" class="site-main"> <?php if ( bp_has_groups ( $args ) ) { /* also tried bp_groups($args) here */ while ( bp_groups() ) : bp_the_group(); ?> <a href="<?php bp_group_permalink(); ?>"><?php bp_group_name(); ?></a> <?php endwhile; } ?> </main> </div> <?php get_sidebar(); get_footer(); ?>
I’m running the newest wordpress and buddypress versions.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.