Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

  • WTHeel
    Participant

    @wtheel

    I hadn’t seen that. Very helpful. Thank you.

    For others:

    $var = $bp->groups->current_group->slug;


    WTHeel
    Participant

    @wtheel

    I just did, but it did not work. I looked at the function, saw $groups_template, and added the following inside and outside of the loop:
    var_dump($groups_template);

    Here’s the code from buddypress.php:

    <?
    /*
    Template Name: BuddyPress
    */
    
    get_header(); 
    $plp_user_check = plp_user_check($current_user);
    	var_dump($groups_template);
    	echo "<br>Course Path: " . bp_get_group_slug();
    include("forums-header.php");
    ?>
    
    <?	if( have_posts() ): ?>
    
    		<? 	while( have_posts() ): the_post();
    				var_dump($groups_template);
    				echo "<br>Course Path: " . bp_get_group_slug();
    				the_content();
    			endwhile; 
    		?>
    
    	<? else: ?>
    
    		<div id="post-404" class="noposts">
    
    			<p><? _e('None found.','example'); ?></p>
    
    		</div><!-- /#post-404 -->
    
    	<? endif; wp_reset_query(); ?>
    
    </div><!-- /#bodyContainer
    <?	get_footer(); ?>

    The first var dump just returned “NULL”. The second one returned:

    object(stdClass)#644 (1) { ["group"]=> NULL }

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar