get_post()
will get a WordPress post from the wp_posts table. This is different to a BuddyPress activity item which is stored in the wp_bp_activity table.
True, but because the content I’m after is all glued together as one solid string inside the action column I have to fish in other database tables to get the content relative to the item. Nothing is saved separately in the wp_bp_activity table.
But the Primary or Secondary item ID of an activity item always matches the ID in the wp_post table depending on what you’re after.
I just don’t know what impact this will have on overal performance when I go wish in other tables for content.
I just don’t know what impact this will have on overal performance when I go wish in other tables for content.
It depends. WordPress and BuddyPress do a great job when it comes to optimising queries but there are things that will cause a big site to simply fall over (the meta_value column isn’t indexed for example so meta querying could be problematic).
Thanks,
I’ve been testing the get_post()
option and the overal number of queries stay the same in the debug bar.
The title should already be saved in activity meta.
$title = bp_activity_get_meta( bp_get_activity_id(), 'post_title' );
This is assuming that the activity item you are checking for is from a blog post.
No I’m busy focussing on the bbPress items for starters, topics and replies as of now.
I have disabled all activity_items to the stream by default except topics and replies. I want to add more items but one at a time and controlled. A BuddyPress site can become overkill feature wise very fast because everything is so connected and relative with each other.
Topics and replies in the stream.
View post on imgur.com