Skip to:
Content
Pages
Categories
Search
Top
Bottom

activity thread displays posts but not comments from custom post type


  • adam_ohern
    Participant

    @adam_ohern

    Thanks all for the fantastic forum! It’s an amazing resource.

    I have a plugin that creates a custom post type called “lightning_posttype”. In the main plugin PHP file, I have the following:

    add_filter( 'bp_blogs_record_comment_post_types', 'activity_lightning_posts' );
    add_filter( 'bp_blogs_record_post_post_types', 'activity_lightning_posts' );

    Then, in a separate PHP file (required earlier in the main PHP script), I have the following function:

    function activity_lightning_posts($post_types) {
        $post_types[] = 'lightning_posttype';
        return $post_types;
    }

    At this point my posts are showing up in the activity feed perfectly, but the comments are not. I’ve been reading and experimenting for quite some time, but can’t seem to find the magic combo.

    Any hints greatly appreciated!

    Adam

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘activity thread displays posts but not comments from custom post type’ is closed to new replies.
Skip to toolbar