Skip to:

Error When Adding Custom Post Type to Activity Feed

Viewing 5 replies - 1 through 5 (of 5 total)

  • producist


    I also saw this about multisite installs in the thread you posted:

    “On multisite configurations, the post types that are registered on any sub-site will need to be registered on the root site in order to be listed in the Activity dropdown filters. That’s the case for the post and page post types”

    The site I’m trying to create a custom post type for is a subsite. I assume the Page Post Type is registered for the root install, so this shouldn’t be causing the problem right?




    don’t know what happens, but i just tested the latest snippet from the codex page and it works flawlessly on a multi and on a single install.

    Which PHP version is used on your site ?



    Hi danbp,

    The PHP version is 5.3.2. I’m using WPEngine as a host.



    I just tried adding the snippets and again and that problem isn’t happening anymore. However, the filter functionality isn’t working…

    See Screenshot —

    Here’s the code I used….

    // hacks and mods will go here ok
    // Don't forget to add the 'buddypress-activity' support!
    add_post_type_support( 'page', '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( 'page', array(
            'component_id'             => buddypress()->blogs->id,
            'action_id'                => 'new_blog_page',
            'bp_activity_admin_filter' => __( 'Published a new page', 'custom-domain' ),
            'bp_activity_front_filter' => __( 'Pages', 'custom-domain' ),
            'contexts'                 => array( 'activity', 'member' ),
            'activity_comment'         => true,
            'bp_activity_new_post'     => __( '%1$s posted a new <a href="%2$s">page</a>', 'custom-textdomain' ),
            'bp_activity_new_post_ms'  => __( '%1$s posted a new <a href="%2$s">page</a>, on the site %3$s', 'custom-textdomain' ),
            'position'                 => 100,
        ) );
    add_action( 'bp_init', 'customize_page_tracking_args' );

    Is there anything I need to add or change in the above code in order to make PAGES show in the filter area?

    Hi there,

    There’s a chance your theme hasn’t updated its templates. In order to have the activity dropdowns populated, please check your templates are up to date see

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error When Adding Custom Post Type to Activity Feed’ is closed to new replies.
Skip to toolbar