Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function my_bp_opengraph() {
- // see if the activity component is active and if we're currently on an activity permalink page
- if ( bp_is_active( 'activity' ) && bp_is_single_activity() ) :
- // add our mini activity loop
- if ( bp_has_activities( 'include=' . bp_current_action() ) ) :
- while ( bp_activities() ) : bp_the_activity();
- ?>
- <meta property="og:description" content="<?php bp_activity_content_body(); ?>"/>
- <?php
- endwhile;
- endif;
- endif;
- }
- add_action( 'bp_head', 'my_bp_opengraph' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement