Query Post Author
-
Hello,
I’m trying to implement the infinite scroll into my author.php page where I have 3 query_posts.
They are all the same, the only difference is the ‘orderby’ parameter.
This is how I’ve been trying to integrate the plugin into my code:
<?php query_posts(array('author' => $author, 'orderby' => 'comment_count', 'posts_per_page' => '5')); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <article> <figure> <?php echo get_the_post_thumbnail($post_id); ?> </figure> <div class="entry-body"> <h3><?php the_title(); ?></h3> </div> </article> <?php endwhile; else: ?> <p><?php _e('No Posts to show!'); ?></p> <?php endif; ?> <?php echo do_shortcode('[ajax_load_more]'); ?>
What am I doing wrong?
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Query Post Author’ is closed to new replies.