WP_User_Query not returning users with meta – what am I missing?
Try using Subscriber, with capital S. $args = array( ‘role’ => ‘Subscriber’, ‘meta_key’ => ‘school’, ‘meta_value’ => $school ); 🙂
Try using Subscriber, with capital S. $args = array( ‘role’ => ‘Subscriber’, ‘meta_key’ => ‘school’, ‘meta_value’ => $school ); 🙂
How can I programmatically show a specific (template) page, like author.php?
I can confidently say that it is empty at the point at which your code checks the variable. The three possibilities are: $user_id is not set or is set to an incorrect value. As you don’t show the code that sets this value, I can’t tell. You are using the wrong key. Something is hooked … Read more
Why does the usermeta table contain html entities?
get_user_meta returning old data
Customize Avatar using user meta
Redirecting users based on custom user meta
use like this: $id = $user->ID; And if user is new set $id = 9999 function my_show_extra_profile_fields( $user ) { if(is_string($user) === true){ $user = new stdClass();//create a new $id = -9999; } $newsletter = esc_attr( get_the_author_meta( ‘_newsletter’, $id ) ); unset($user); }
Subscribers Group User meta delete
Your <?php/?> tags are aligned such that none of your actual PHP code is being interpreted as PHP code (except the is_page (‘1150′) conditional) – it’s actually just printing it all into your markup, including the <script> element. So since it’s not running the logic to check the user or the user meta-data, the script … Read more