CPT in Activity with Detail
I have figured out how to get my Custom Post Types into the activity stream and it all works well so I’d like to refine that somewhat and am not sure where to start. I’d like to include a lot more detail about the CPT in the activity.
I noticed that when I turn on the ‘Site Tracking’ component and then create a new post I get the standard ‘John wrote a new post, <post title>’ but it also includes the first 200 or so chars from the post content. I’d like to do something like that but build a custom string from the data that is stored in the CPT.
So end up with something like this:
JohnSmith checked in
John drank ABC Beer at XYZ Bar and rated it:5.
Note: The beer was great. I loved it
I’d love any pointers on how I might be able to do something like that. Or if you could point me to the code that the Site Tracking component uses to insert Posts into the activity stream that might be a good start also.
- You must be logged in to reply to this topic.