Can't seem to get BP 2.2's Post Types Activities working
-
I’ve read the relevant codex page https://codex.buddypress.org/plugindev/post-types-activities/ and have copied the code given there, but it doesn’t seem to want to work for me.
My custom post type is “music”, and I want it on the activity stream, so I amended the code to:
add_post_type_support( 'music', 'buddypress-activity' ); function customize_page_tracking_args() { if ( ! bp_is_active( 'activity' ) ) return; bp_activity_set_post_type_tracking_args( 'music', array( 'component_id' => buddypress()->activity->id, 'action_id' => 'new_music', 'bp_activity_admin_filter' => __( 'Added a new Music Resource', 'custom-domain' ), 'bp_activity_front_filter' => __( 'Music', 'custom-domain' ), 'contexts' => array( 'activity', 'member' ), 'activity_comment' => true, 'bp_activity_new_post' => __( '%1$s added a new <a href="%2$s">music resource</a>', 'custom-textdomain' ), 'bp_activity_new_post_ms' => __( '%1$s added a new <a href="%2$s">music resource</a>, on the site %3$s', 'custom-textdomain' ), 'position' => 100, ) ); } add_action( 'bp_init', 'customize_page_tracking_args' );
But all I get in the activity stream is the generic
Site Admin wrote a new item 10 seconds ago
and Music does not appear in the Show drop-down menu.What am I missing?
Cheers
Viewing 18 replies - 1 through 18 (of 18 total)
Viewing 18 replies - 1 through 18 (of 18 total)
- The topic ‘Can't seem to get BP 2.2's Post Types Activities working’ is closed to new replies.