Re: Different User Profiles
Ok so I created;
/wp-content/plugins/bp-custom.php with the below in it;
/**
* bp_check_usertype()
* TEMPLATE TAG
*
*/
function bp_check_usertype($userID) {
global $bp, $wpdb;
$qry = $wpdb->get_var("SELECT value FROM wp_bp_xprofile_data WHERE field_id = 5 AND user_id = " . $userID);
/* Sort the nav by key as the array has been put together in different locations */
echo $qry;
}
However when I call it in /bp-themes/mymember/profile/index.php like so;
$bp->bp_check_usertype($bp->displayed_user->id);
I get the following error
Fatal error: Call to undefined function: bp_check_usertype() in /html/wp-content/bp-themes/mymember/profile/index.php on line 31
Am I missing something?