Home › Forums › Plugin Support › WP User Frontend (Free Version) › List of Tasks by Assigned User This topic is: resolved Tagged: assigned, get_posts, task lists, tasks This topic contains 4 replies, has 2 voices, and was last updated by Elitivia 6 years, 1 month ago. Viewing 5 posts - 1 through 5 (of 5 total) Author Posts April 29, 2013 at 11:17 am #2976 ElitiviaParticipant Post count: 4 Hi there, This is a great plugin, thank you. I can display a list of the most recent tasks for all users, but I'm having trouble showing tasks only assigned to a specific user. Could you please confirm the code that displays this? I have; ‘post_type' => ‘task', ‘meta_key' => ‘_assigned', ‘meta_value' => ‘3' Thank you in advance, Claire April 29, 2013 at 11:34 am #2977 Tareq HasanKeymaster Post count: 2831 The query should work. April 29, 2013 at 11:40 am #2978 ElitiviaParticipant Post count: 4 Hi Tareq, The full query is $query = new WP_Query( array( ‘numberposts' => 8, ‘post_type' => ‘task', ‘meta_key' => ‘_assigned', ‘meta_value' => ‘3' ) ); and it doesn't work. Am I missing something? Thanks, Claire April 29, 2013 at 11:50 am #2980 Tareq HasanKeymaster Post count: 2831 $tasks = new WP_Query( array( 'post_type' => 'task', 'meta_key' => '_assigned', 'meta_value' => '1' ) ); var_dump( $tasks->get_posts() ); Just worked! April 29, 2013 at 10:46 pm #2994 ElitiviaParticipant Post count: 4 Thank you very much for the quick response. The code you sent didn't work for me, but the following did; global $post; $myposts = get_posts('numberposts=50&offset=0&post_type=task&meta_value=3'); foreach($myposts as $post) : setup_postdata($post); ?> <li><a>ID ); ?>"><?php echo get_the_title( $task->ID ); ?></a></li> <?php endforeach; Author Posts Viewing 5 posts - 1 through 5 (of 5 total) The topic ‘List of Tasks by Assigned User’ is closed to new replies.