Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Displaying Custom Fields in Home Widgets


Burt Adsit
Participant

@burtadsit

The recent blog posts widget displays posts from all public blogs which means if you just do get_post_meta() you’ll get the meta from the current blog. Not exactly what you are interested in. There’s a bp template tag to get just about everything else but the meta data. So you have to temporarily:

switch_to_blog( $post->blog_id );

$post_meta = get_post_meta(<your params>);

restore_current_blog();

Then do whatever you want with the $post_meta value you just retrieved.

Skip to toolbar