Tag Info

New answers tagged


You need to pass author__in as an array but that isn't what you doing with this: ( array( 'author__in' => array( $followed ) ) ). You are creating an odd set of nested arrays. WP_Query isn't going to know what to do with it. A much simplified version should work: $followed = $wpdb->get_col(" SELECT user_id1 FROM wp_um_followers WHERE user_id2 ...


Use $wpdb->get_col. It will return a one-dimensional array that you can use in post__in $allposts = $wpdb->get_col("SELECT `music_id` FROM `custom_table` ORDER BY id DESC LIMIT 5");


$id = array(); foreach ($allposts as $singlepost) { $id[]= $singlepost->music_id; }


Try var_dump(get_user_meta($user->ID, 'wpcf-team-experience-member-type'), true). The third parameter for get_user_meta (called $single) specifies whether to return a single value (true) or an array (false). The default is false.

Top 50 recent answers are included