Skip to:

Custom post type activity comments

  • megabait12


    Hello, I would like to know how to synchronize custom post type comments and activity stream comments. What I mean when somebody comment on the cpt page then comment should appear on the activity stream, and backward if somebody comment cpt activity post then comment should appear on cpt page. Also question is it possible to add featured image of cpt to activity? And one more question in the activity stream link to cpt showing url with parameters ?p=, but if you go to this page there is normal url (user friendly). Thank you
    BuddyPress 2.2.1, WordPress 4.1.1

    add_post_type_support('portfolio', 'buddypress-activity');
    function customize_page_tracking_args() {
        // Check if the Activity component is active before using it.
        if (!bp_is_active('activity')) {
        bp_activity_set_post_type_tracking_args('portfolio', array(
            'component_id' => buddypress()->activity->id,
            'action_id' => 'new_portfolio',
            'bp_activity_admin_filter' => __('Published a new recommendation', 'scuppies'),
            'bp_activity_front_filter' => __('Recommendations', 'scuppies'),
            'contexts' => array('activity', 'member'),
            'activity_comment' => true,
            'bp_activity_new_post' => __('%1$s posted a new <a href="%2$s">recommendation</a>', 'scuppies'),
            'bp_activity_new_post_ms' => __('%1$s posted a new <a href="%2$s">recommendation</a>, on the site %3$s', 'scuppies'),
            'position' => 100,
    add_action('bp_init', 'customize_page_tracking_args');
  • The topic ‘Custom post type activity comments’ is closed to new replies.
Skip to toolbar