Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $allProjectArgs = array(
- 'post_type' => 'project',
- 'post_status'=> 'publish',
- 'posts_per_page'=> -1,
- 'orderby' => 'favorit_users',
- 'order' => 'DESC',
- 'meta_query' => array(
- 'relation' => 'AND',
- array(
- 'key' => 'project_users',
- 'value' => '"'.get_current_user_id().'"',
- 'compare' => 'NOT LIKE'
- ),
- "favorit_users" => array(
- 'key' => 'favorite_users',
- 'value' => '"'.get_current_user_id().'"',
- 'compare' => 'LIKE'
- ),
- ),
- );
- $allProjectQuery = new WP_Query($allProjectArgs);
- while($allProjectQuery->have_posts()) : $allProjectQuery->the_post();
- ?>
- <li><?php the_title(); ?></li>
- <?php
- endwhile;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement