Forum Replies Created
-
The only way I was able to get this to work was by modifying my custom post type directly in the functions.php. Agnes, perhaps this will help you as well:
function create_post_type_videos() { register_post_type( 'my_videos', array( 'labels' => array( 'name' => __( 'Videos' ), 'add_new_item' => __( 'Add Video' ), 'edit_item' => __( 'Edit Video' ), 'all_items' => __( 'All Videos' ), 'singular_name' => __( 'Videos' ), 'view' => __( 'View Videos' ), 'view_item' => __( 'View Video' ), 'search_items' => __( 'Search Videos' ), 'not_found' => __( 'No videos found.' ), 'not_found_in_trash' => __( 'No videos found in Trash.' ), ), 'public' => true, 'has_archive' => false, 'supports' => array( 'title', 'author', 'editor', 'thumbnail', 'revisions', 'comments', 'buddypress-activity' ), 'taxonomies' => array( 'product_type', 'videos_categories' ), 'rewrite' => array('slug' => 'videos'), 'menu_icon' => 'dashicons-video-alt3', 'menu_position' => 5, 'bp_activity' => array( 'action_id' => 'new_video', 'comment_action_id' => 'new_video_comment', ) ) ); } add_action( 'init', 'create_post_type_videos' );
The key bits of code are the ‘buddypress-activity’ the ‘supports’ array and the ‘bp-activity’ array at the end. After modifying my custom post type to include this code, I now see comments appearing in the Activity Stream.
Perhaps someone could verify if this code is correct, and also explain why the code in Shane’s example (and in the BP docs) is not working?
I’m in the same boat and would love to hear some feedback on this question. It’s exciting to see Custom Post Type Tracking included in 2.5 but the documentation is a little hard to understand.
If anyone could please explain how to enable comment tracking for custom post types (in layman’s terms), it would be a huge help.