New answers tagged

0 votes
Accepted

delete_user_meta from a foreach results page

This is such a convoluted way of doing this. You should separate the delete_user_meta call from the foreach entirely and put type="hidden" inputs in the form with the rest of the data you ...
user avatar
  • 903
0 votes

Show/hide posts and categories based on user meta

You should check the pre_get_posts() filter hook.
user avatar
0 votes

Checking if meta_value exists for any user

this is working for me if ( metadata_exists( 'user', $user_id, $meta_key ) ) { print_r("Exists"); } else { print_r("Not Exists"); }
user avatar

Top 50 recent answers are included