Skip to content

Instantly share code, notes, and snippets.

@sbruner sbruner/gist:1845471
Created Feb 16, 2012

What would you like to do?
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
You can’t perform that action at this time.