-
Creative Dutchman replied to the topic Activity Wall – Show Featured image like Facebook in the forum Requests and Feedback 9 years, 7 months ago
Just a quick update:
I found this link with some useful information. I tried adding the code to my functions.php and it’s almost working. Just not getting the img source.https://buddypress.org/support/topic/add-post-featured-image-in-activity-stream/
Hope this helps!
This is the snippet btw:function icondeposit_bp_activity_entry_meta() {
if ( bp_get_activity_object_name() == 'blogs' && bp_get_activity_type() == 'new_blog_post' ) {?>
<?php
global $wpdb, $post, $bp;
$theimg = wp_get_attachment_image_src( get_post_thumbnail_id( bp_get_activity_secondary_item_id() ) );
?>
<img src="<?php echo $theimg[0]; ?>" ><?php }
}
add_action('bp_activity_excerpt_append_text', 'icondeposit_bp_activity_entry_meta');