How to display a post's category name in the BuddyPress activity feed?
WPMU DEV Community
How to display a post's category name in the BuddyPress activity feed?
Elite
26 pointsStarting to get into this DEV thingI'm new here
3RING
Member
—
10th February 2012 02:40
Hey All,
Typically, the BP activity stream identifies a post like this:
"User10 wrote a new post, I Like Powerboats 59 seconds ago"
Is there a way to display the category of the post as well (all our posts are single categories) like this:
"User10 wrote a post in Boats, I Like Powerboats 59 seconds ago" (where "Boats" is the category the post was made in)?
Typically, the BP activity stream identifies a post like this:
"User10 wrote a new post, I Like Powerboats 59 seconds ago"
Is there a way to display the category of the post as well (all our posts are single categories) like this:
"User10 wrote a post in Boats, I Like Powerboats 59 seconds ago" (where "Boats" is the category the post was made in)?
I've not attempted to pull the category myself, but if you checkout the loop it should be similar to how WP do it.
Without researching it more in-depth I couldn't be sure but you might need to create a custom function. You'd have to look at how the current blog data is pulled.
Responses (1)
Support Chimp — 10th February 2012 03:03 #
Hey 3RING.
I think the best place for you to start would be to look into the BP Loop:
http://codex.buddypress.org/developer-docs/custom-buddypress-loops/
I've not attempted to pull the category myself, but if you checkout the loop it should be similar to how WP do it.
Without researching it more in-depth I couldn't be sure but you might need to create a custom function. You'd have to look at how the current blog data is pulled.
Take care.
Become a member