Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
Download ZIP
Custom BuddyPress Activity Stream
/* = Generate Custom Activity Stream
* Place this function anywhere you want to show your custom stream.
* Should accept any of these parameters:
/* = Custom Activity Stream
* Place this function in bp-custom.php (in your plugins directory)
function my_activity_stream($args ) {
if ( bp_has_activities($args) ) : ?>
<div class="pagination">
<div class="pag-count"><?php bp_activity_pagination_count() ?></div>
<div class="pagination-links"><?php bp_activity_pagination_links() ?></div>
<ul id="activity-stream" class="activity-list item-list">
<?php while ( bp_activities() ) : bp_the_activity(); ?>
<li class="<?php bp_activity_css_class() ?>" id="activity-<?php bp_activity_id() ?>">
<div class="activity-avatar">
<a href="<?php bp_activity_user_link() ?>">
<?php bp_activity_avatar( 'type=full&width=100&height=100' ) ?>
<div class="activity-content">
<div class="activity-header">
<?php bp_activity_action() ?>
<?php if ( bp_get_activity_content_body() ) : ?>
<div class="activity-inner">
<?php bp_activity_content_body() ?>
<?php endif; ?>
<?php do_action( 'bp_activity_entry_content' ) ?>
<?php endwhile; ?>
<?php else : ?>
<div id="message" class="info">
<p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ) ?></p>
<?php endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.