Skip to:
Content
Pages
Categories
Search
Top
Bottom

Best way to add custom posts to activity stream


  • leanneoleary
    Participant

    @leanneoleary

    I have a custom post type with custom meta which is submitted via the frontend. Whenever the form is submitted I need to register this in the activity stream. I have had a look around the documentation and using the function bp_activity_add() looks like the obvious solution but in previous forum posts it has been mentioned to use the following code instead:

    add_filter ( 'bp_blogs_record_post_post_types', 'activity_publish_custom_post_types' );
    function activity_publish_custom_post_types() {
      $media = array('videos', 'pictures');
      return $media;
    }

    Can anyone advise which would be the better options and also how to implement the code properly? I am fairly new to both wordpress and buddypress and so do not know whether to add this to the main functions.php file and if so how.

    many thanks

  • The topic ‘Best way to add custom posts to activity stream’ is closed to new replies.
Skip to toolbar