How can I include user meta information in the resulting array of a WP_User_Query?

To sort by meta fields you need to use meta_key and meta_value (or meta_value_num): array( ‘meta_key’ => ‘sort_order’, //This is the custom field to orderby ‘orderby’ => ‘meta_value_num’, //for numerical values ‘role’ => ‘Administrator’, ‘fields’ => ‘all_with_meta’, ); However… This will probably order the results before your merge… so, instead of separate queries you can … Read more

Username has been exposed

Yes, the links will always be accessible unless you disable them on your htaccess or a PHP file. If you don’t have any author page, probably the users (or bots) that are reaching this page are seeing your index page. I highly recommend you install Google Analytics code on your website to track what your … Read more

Need help getting a certain value out of a multi dimensional array

The reason you get the “First” Array is that you don’t use the “single” option of the get_user_meta function. Try this: $arr = get_user_meta($user->ID, ‘wpcf-team-experience-member-type’,true); $options = array(); if(is_array($arr)){ foreach($arr as $key => $value){ foreach($value as $arrvalue){ $options[] = $arrvalue; } } } var_dump($options); This should dump all the options that maybe are in there. … Read more

Redirecting to an external URL

Use is_user_logged_in() to show link only or logged in users. And use the_author_meta() to get url to google drive. Like this inside The Loop: <?php if(is_user_logged_in()): ?> <a href=”https://wordpress.stackexchange.com/questions/201838/<?php the_author_meta(“google_drive_url’) ?>”>Click to open Google Drive</a> <?php endif; ?>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)