Buddypress integration and WordPress comments
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Buddypress integration and WordPress comments’ is closed to new replies.
Home / Plugin: AddToAny Share Buttons / Buddypress integration and WordPress comments
It’ll involve some custom theming and the AddToAny share buttons template tag. For example, here’s how to add the share buttons to each BuddyPress comment…
In your BuddyPress theme’s comment.php
file, you’ll add this snippet:
<?php
if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) {
ADDTOANY_SHARE_SAVE_KIT( array(
'linkname' => bp_get_activity_comment_name(),
'linkurl' => bp_get_activity_comment_permalink(),
) );
echo '<script>if (a2a) a2a.init("page");</script>';
}
?>
Add the snippet right before this line:
<?php bp_activity_recurse_comments( bp_activity_current_comment() ); ?>
(The function might be named bp_nouveau_activity_recurse_comments
instead.)
Thank You .
(@anelka22)
8 months, 2 weeks ago
Good morning,
Is it possible to add the AddToAny share buttons in WordPress and buddypress comments? to allow sharing of comments, a user’s buddypress profile and buddypress activities? if yes can you give us code snippets to do it? Thanks in advance.