Can anyone help me out with this?
Please disregard, I wrote a quick sitewide plugin that handles this.
@parkstreet – will you be sharing this plugin
@parkstreet
In case you want to give it a try later, the reason the filter didn’t work is because of the fourth parameter in add_filter(‘bp_blog_description’, ‘get_users_blog_description’,10,2). The fourth parameter is for the number of accepted arguments. The number of accepted arguments is determined by the number of arguments passed by the corresponding apply_filters(). In the case of ‘bp_blog_description’, only one argument is passed, which is the blog description. However, you are telling the add_filter() function that apply_filters() is sending two arguments its way, which in turn causes it to fail when it only receives one. The fourth parameter defaults to one, which is what you want for your example, so
add_filter(‘bp_blog_description’, ‘get_users_blog_description’,10);
should do the trick.
@parkstreet – I think you’re making this way too complicated!
The easiest way is to copy over the /blogs/blogs-loop.php to your child theme and use the template tag: bp_blog_description()
somewhere in the loop.
There’s an action to hook into in the bp-default template, but the hook is after the last activity block, which is probably not where you want the blog description to show up.
I think I may have been a little unclear about what I am trying to do. I don’t want the blog’s description that is currently in the wp_bp_user_blogs_blogmeta table. I want the blog description that was entered in wp_{blog_id}_options table for each blog. The bp_blog_description tag works whether I copy over the file to the child theme or not. So what my plugin does is allow each blogger to update the buddypress table that corresponds with the current blog with a 250 character description of that blog.
@mercime, at some point I will. But at the moment I don’t feel comfortable sharing it because it was just a quick and dirty (yet secure) solution for me. Once I clean it up and test it more thoroughly, I will release it if people are really interested in a plugin like this. But maybe someone else has a better solution to be able to tap into each blog’s options table to pull the blog description. On second thought, maybe there isn’t a way and that is why the buddypress blog meta table exists in the first place.
@parkstreet – Gotcha!
Looks like this issue has been reported:
https://trac.buddypress.org/ticket/2415
Ah, I see. I’ve never noticed it before so did not think it was a bug. Thanks @r-a-y for bringing that to my attention.
Joshmac and BP community –
I put a vote in for seeing a plugin that displays a description in the blog directory.
bump! Share the plugin? Pretty please?