@bennypowers
8 years, 6 months ago
Here’s my broken snippet. I think I’m not grokking something about apply_filters()
<?php $button = array( 'wrapper_class' => '', 'link_class' => 'read-more-button' ); apply_filters( 'bp_get_blogs_visit_blog_button', $button );
Success! I needed to use bp_get_blog_id() instead of bp_blog_id()
tried this, but it just prints the user id to page
add_action( 'bp_directory_blogs_item', 'display_user_xprofile' ); function display_user_xprofile() { $args = array( 'user_id' => get_user_id_from_string( get_blog_option(bp_blog_id(), 'admin_email') ), 'field' => 'Phone', // Field name or ID. // 'field' => 'Car', // Field name or ID. // 'field' => 'Languages', // Field name or ID. ); $phone_number = bp_get_profile_field_data( $args ); if ($phone_number) { echo 'Phone Number: ' . $phone_number; // echo 'Car?: ' . $phone_number; // echo 'Languages: ' . $phone_number; } }