-
Author
-
June 2, 2016 at 02:43 #124059
clyn
ParticipantHi,
Buddypress activity display new blog post or cpt (i added my cpt to bp-custom.php such as book). I am using types and members can add new book with types form. Also can add media from URL image or video. And when i add new book with this form, buddypress activity show MRx published new book…
Buddypress displaying also image added with URL but not display embed video. Â I tried on backend admin side and created default wp post or custom post type (i added embed video to post) but buddypress did not display this video.. Only show images and post body text…
What could be the problem?
I added this code to bp-custom php. Code working, always display new publish, my tyeps frontend form also working, adding new book to DB, also adding video or image by URL. Problem is buddypress did ot show added video by URL or embed to post….
add_post_type_support( ‘music’, ‘buddypress-activity’ );
function customize_page_tracking_args() {
// Check if the Activity component is active before using it.
if ( ! bp_is_active( ‘activity’ ) ) {
return;
}
bp_activity_set_post_type_tracking_args( ‘book’, array(
‘component_id’ Â Â Â Â Â Â => ‘activity’,
‘action_id’ Â Â Â Â Â Â Â Â => ‘new_book’,
‘bp_activity_admin_filter’ => __( ‘My Book’, ‘custom-domain’ ),
‘bp_activity_front_filter’ => __( ‘Book’, ‘custom-domain’ ),
‘contexts’ Â Â Â Â Â Â Â Â => array( ‘activity’, ‘member’ ),
‘bp_activity_new_post’ Â Â => __( ‘%1$s published <a href=”%2$s”>Book</a>’, ‘noid’ ),
‘bp_activity_new_post_ms’ Â => __( ‘%1$s published <a href=”%2$s”>Book/a>, on the site %3$s’, ‘noid’ ),
) );
}
add_action( ‘init’, ‘customize_page_tracking_args’, 1000 );
Thanks….
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.