-
vince_ replied to the topic Get xprofile field value in functions.php in the forum How-to & Troubleshooting 11 years, 4 months ago
I’ve got it … It wasn’t in the right order … I feel stupid
add_action( ‘init’, ‘my_em_setup_nav’ );
function my_em_setup_nav(){
global $bp;
$args = array(
‘field’ => ‘Role’,
‘user_id’ => bp_loggedin_user_id()
);
$role = bp_get_profile_field_data($args);
if( $role == “Role1″…[Read more] -
vince_ replied to the topic Get xprofile field value in functions.php in the forum How-to & Troubleshooting 11 years, 4 months ago
no sorry, it returns the right number
-
vince_ replied to the topic Get xprofile field value in functions.php in the forum How-to & Troubleshooting 11 years, 4 months ago
bp_loggedin_user_id() returns 0
-
vince_ replied to the topic Get xprofile field value in functions.php in the forum How-to & Troubleshooting 11 years, 4 months ago
It’s not working, here is my entire code (without the “if” condition it’s working) :
$args = array(
'field' => 'Role',
'user_id' => bp_loggedin_user_id()
);$role = bp_get_profile_field_data($args);
add_action( 'init', 'my_em_setup_nav' );function my_em_setup_nav(){
global $bp;
if( $role == "Role1"…[Read more] -
vince_ replied to the topic Get xprofile field value in functions.php in the forum How-to & Troubleshooting 11 years, 4 months ago
Hi,
No, it’s not working. My 2 other techniques work in other pages but not in functions.php.
Does this file have something special ?Thanks
-
vince_ started the topic Get xprofile field value in functions.php in the forum How-to & Troubleshooting 11 years, 4 months ago
Hi Guys !
I need to get the value of the “Role” xprofile field of the current logged in user in the functions.php file (It’s located in bp-themesbp-default)
I tried the following stuff :
$role = xprofile_get_field_data(“Role”, bp_get_group_member_id());
AND
$role = bp_get_profile_field_data(
array(
‘field’ => “Role”, // where 1 is the…[Read more] -
vince_ started the topic "Order by" doesn't work in the forum Installing BuddyPress 11 years, 5 months ago
Hi,
I am using WP 3.5.1 and BP 1.7.2. The “Order by” function in my website :
http://teachersinvietnam.com/members/
isn’t working. In Chrome I have the following message :
Uncaught TypeError: Cannot call method ‘split’ of undefined global.js:658
What can I do to fix this problem ?
Thank you very much,
Regards, Vincent
@vince_
Active 7 years, 10 months ago