GeoDirectory Supportnew tab and bo activity stream – GeoDirectory Support https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/feed Thu, 15 Jan 2026 14:26:40 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37436 <![CDATA[new tab and bo activity stream]]> https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37436 Fri, 17 Apr 2015 20:30:04 +0000 urbanfix I have created a new tab on the listings detail page and would like to display the authors activity stream on it, would this be hard to do? Can anybody point me in the right direction?
Would i simply call in the activity loop within the functions.php file?
Thanks

]]>
https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37438 <![CDATA[Reply To: new tab and bo activity stream]]> https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37438 Fri, 17 Apr 2015 20:43:02 +0000 Paolo Hi,

yes using the user_id as filter.

To get the author ID of a listing, you can use get_the_author_meta

Here you can find examples: https://codex.buddypress.org/developer/loops-reference/the-activity-stream-loop/#filtering-examples

Thanks

]]>
https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37440 <![CDATA[Reply To: new tab and bo activity stream]]> https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37440 Fri, 17 Apr 2015 20:52:58 +0000 urbanfix Thanks paolo,
just to give me a kick in the right direction can you explain where i would put the following code.

This is my add new tab in functions.php


<?php add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend') ;

function geodir_detail_page_tab_list_extend($tab_array)
{
 	$tab_array['my_new_tab'] = array( 
										'heading_text' =>  __('New Tab',GEODIRECTORY_TEXTDOMAIN),
										'is_active_tab' => false,
										'is_display' =>  apply_filters('geodir_detail_page_tab_is_display', true, 'my_new_tab'),
										'tab_content' => ''
									);
	return $tab_array ;
}
add_action('geodir_after_tab_content' ,'geodir_my_new_tab_content');
function geodir_my_new_tab_content($tab_index)
{
	if($tab_index =='my_new_tab')
	{
		echo "Hello world!!";
	}
}
?>

where would i add the following basic activity loop?


<?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
    <?php while ( bp_activities() ) : bp_the_activity(); ?>
 
        <?php locate_template( array( 'activity/entry.php' ), true, false ); ?>
 
    <?php endwhile; ?>
<?php endif; ?>

Thanks

]]>
https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37442 <![CDATA[Reply To: new tab and bo activity stream]]> https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37442 Fri, 17 Apr 2015 21:01:03 +0000 Paolo Something like that.


if($tab_index =='my_new_tab')
	{?>
		
<?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
    <?php while ( bp_activities() ) : bp_the_activity(); ?>
 
        <?php locate_template( array( 'activity/entry.php' ), true, false ); ?>
 
    <?php endwhile; ?>
<?php endif; } ?>

Thanks

]]>
https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37455 <![CDATA[Reply To: new tab and bo activity stream]]> https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37455 Sat, 18 Apr 2015 00:59:20 +0000 urbanfix I am really stuck with this and i just can’t figure it out,
I dont know how to get the php to display on the tab its self, i just keep getting errors, I even tried to add a simple bit of code to get the user id and i got an error!
I have wasted far to much time on this, say i wanted to add this code the my new tab;


<?php function get_user(){

global $bp;
$username = $bp->loggedin_user->id;
echo $username;
}

get_user(); ?>

how would i add it to the new tab?

]]>
https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37490 <![CDATA[Reply To: new tab and bo activity stream]]> https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37490 Sat, 18 Apr 2015 13:06:11 +0000 urbanfix Any help guys…?

]]>
https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37498 <![CDATA[Reply To: new tab and bo activity stream]]> https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37498 Sat, 18 Apr 2015 16:52:41 +0000 Paolo Hi Urbanfix,

to do that, you should ask for support on the buddypress forum, don’t you think?

The function you need is not part of our plugin and we don’t support 3rd party plugins.

Our responsability is to tell you how to create the new GD tab and how to put new content in it.

To write a function for another plugin to actually create the content is part of your job.

Thanks

]]>
https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37500 <![CDATA[Reply To: new tab and bo activity stream]]> https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37500 Sat, 18 Apr 2015 17:47:41 +0000 urbanfix okay fair enough,
In that case could you tell me how to add this


<?php function get_user(){

global $bp;
$username = $bp->loggedin_user->id;
echo $username;
}

get_user(); ?>

into my new tab?

]]>
https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37503 <![CDATA[Reply To: new tab and bo activity stream]]> https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37503 Sat, 18 Apr 2015 18:29:00 +0000 Paolo This should work:


add_action('geodir_after_tab_content' ,'geodir_my_new_tab_content');
function geodir_my_new_tab_content($tab_index)
{
	if($tab_index =='my_new_tab')
	{
	global $bp;
        $username = $bp->loggedin_user->id;
        echo $username;
	}
}

Let us know,

Thx

]]>
https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37787 <![CDATA[Reply To: new tab and bo activity stream]]> https://wpgeodirectory.com/support/topic/new-tab-and-bo-activity-stream/#post-37787 Wed, 22 Apr 2015 09:21:18 +0000 urbanfix Could i use a shortcode on the tab?
I am using this plugin; http://buddydev.com/plugins/bp-activity-shortcode/
Can i use the shortcode to add it to the tab i created?
Thanks

]]>