Current User In Custom Menu Item URL [closed]

Congrats on figuring it out. Perhaps this would also work: function change_menu($items){ foreach($items as $item){ if ($item-> post_name == ‘the-slug’)/*replace “the-slug” with menu item post_name */ $item->url = bp_loggedin_user_domain() . ‘/events/my-events/?action=edit’; } return $items; } add_filter(‘wp_nav_menu_objects’, ‘change_menu’);

How to get its meta_value of a specific meta_key within wp_usermeta

@Cristián Lávaque Thank you for the hints 😉 Actually I managed to resolve the issue blocking this function (show the hidden comment above). In case this would help anyone here is the final working code: function check_post_limit() { if ( current_user_can( ‘edit_posts’ ) ) { global $userdata; global $wpdb; $s2member_last_payment_time = get_user_meta( get_current_user_id(), ‘wp_s2member_last_payment_time’, true … Read more

editing usermeta when field is an array

This code is your problem: $s2_custom=get_user_meta($u->ID, ‘wp_s2member_custom_fields’); $real = $s2_custom[0]; $real[‘loomsong_del’]=’email’; update_user_meta($u->ID, ‘wp_s2member_custom_fields’,$real); get_user_meta returns an array of the meta values. Since in this case there’s only a single value with the array, you need to pass the single parameter to it. Try this: $s2_custom=get_user_meta($u->ID, ‘wp_s2member_custom_fields’, true); $s2_custom[‘loomsong_del’]=’email’; update_user_meta($u->ID, ‘wp_s2member_custom_fields’,$s2_custom); This won’t fix your already … Read more

Specific way to allow WordPress users to view their current password? And edit it?

Viewing passwords is not possible, because they are not stored anywhere. WordPress stores just the hash of the password, not the password itself. When a user sends her password to authenticate herself, WordPress creates a hash of the sent password and compares that to the stored hash. You should not try to store the passwords … Read more

Enabling Cache on WP Membership Sites. Good OR Bad?

Source: Chris Lima – Managing a High Performance WordPress Membership Site I should look at caching plugins because it makes things faster, better and worked for you. The problem with that answer is that most caching plugins don’t do much for logged in users. Most sites have is that non-logged in users should get pre-cached … Read more