Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Get Each Blogs Description


Brandon Allen
Participant

@cnorris23

@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.

Skip to toolbar