Modify users.php query with multiple taxonomies

Because I’m also storing the user IDs against each company, office and team post object as user taxonomy I can reverse the query and only include the user IDs assigned to that specific post object. A similar thing to what has been done here – http://mywebsiteadvisor.com/learning/tutorials/building-simple-groups-plugin-for-wordpress-tutorial/step-5/ Only I’ve modified it to be a bit more … Read more

Linking Custom Fields to Database Records

Custom field data saved in the wp_postmeta table. Best way to access custom field is using wordpress built-in functions. for example: <?php $mykey_values = get_post_custom_values(‘my_key’); foreach ( $mykey_values as $key => $value ) { echo “$key => $value (‘my_key’)<br />”; } ?> 0 => First value (‘my_key’) 1 => Second value (‘my_key’) 2 => Third … Read more

List of users inside custom taxonomy

get_terms and get_posts return arrays not objects. Try this: <?php $disciplines = get_terms(‘disciplines’); foreach($disciplines as $discipline) { echo ‘<li><a href=”#”>’ . $discipline[‘name’] . ‘</a></li>’; $post_args = array( ‘post_type’ => ‘users’, ‘disciplines’ => $discipline[‘term_id’]); $posts = get_posts( $post_args ); foreach( $posts as $post ){ echo ‘post title: ‘ . $post[‘post_title’] . ‘<br />’; } } ?>

Is this code true or not

Best way to find if a code works or not is to actually try it 😉 On the face of it, it doesn’t look like you are trying to handle storing the user ids in an array or any serialized way at all.