Sorting post index by users you're following using wp_query
-
I have it so on my site any user can submit posts. What I’m trying to do is sort posts by all the users that the user is following. Is it possible to sort posts in this way? I read your Github wiki I tried this wondering if it would work:
<?php $args = array( 'posts_per_page' => 6, 'post_type' => 'images', 'user_id' => bp_get_following_ids( )); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); the_title(); echo '<div class="entry-content">'; the_content(); echo '</div>'; endwhile; ?>
No luck though.
The plugin works awesome and thank you for any help I may receive ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Sorting post index by users you're following using wp_query’ is closed to new replies.