Skip to:
Content
Pages
Categories
Search
Top
Bottom

Exclude Category from Activity Stream

  • @stef78

    Participant

    Is it possible to exclude every post from a certain category.. out of the Activity Stream? If so, how can this be done?

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • @stef78

    Participant

    anyone? I’m quite stuck at this.

    @stef78

    Participant

    @boonebgorges

    Keymaster

    @stef78 If the activity items already exist, you can try something like the following: http://pastebin.com/baERuzVQ

    Obviously there are some holes to be filled in, but the comments should lead you in the right direction.

    This is not, by the way, a very efficient way to handle it, as switch_to_blog() is a bit of a resource hog. It’d be better to keep those activity items from being written in the first place. Look in bp-blogs.php to see how the bp_blogs_record_post() function works. I suggest that you hook to save_post (like bp_blogs_record_post() is) witha lower priority, do your category check, and then unhook bp_blogs_record_post from save_post if the post is in the returned category.

    @stef78

    Participant

    Hi Boon, thanks again!

    Though I’m affraid that my coding skills are just too low to solve this one.
    Thanks for you effort though.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Exclude Category from Activity Stream’ is closed to new replies.
Skip to toolbar