Authors Page is not displaying all posts of author
-
In my authors template, when an author is a “co-author” (2nd, not primary in the list), it won’t display some posts of his as co-author.
I saw a posting from 3 years ago to user author terms, but I’m not sure how to do this in my current code. $user_login didn’t work for me. Can you help me?
Here is the code I’m using in the author’s page:
<?php global $query_string; ?> <?php $my_query_string = $query_string; ?> <?php $resultsDisplayed = 0; ?> <?php foreach (array('Tutorials','News','Podcast','Articles','Expo Coverage') as $catname) : ?> <?php $catid = get_cat_id($catname); ?> <?php $myquery = new WP_Query($my_query_string . "&cat=$catid"); ?> <?php if ($myquery->have_posts()) : ?> <?php $resultsDisplayed ++; ?> <h2><?php echo "<a href='" . get_category_link( $catid ) . "'>" . $catname . "</a> (" . $myquery->post_count . ")"; ?></h2><br> <ul class="recent-posts"> <?php while ($myquery->have_posts()) : $myquery->the_post(); ?> <li id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( option::is_on( 'display_thumb' ) ) { ?> <div class="post-thumb"> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"> <?php if ( has_post_format( 'video' ) ) { echo '<span class="video-icon"></span>'; } ?> <?php get_the_image( array( 'size' => 'loop', 'link_to_post' => false, 'width' => 260, 'height' => 180 ) ); ?> </a> </div> <?php } ?> <div class="post-content"> <div class="post-meta"> <?php if ( option::is_on( 'display_date' ) ) { ?> <span class="meta-date"><?php echo get_the_date(); ?></span> <?php } ?> </div> <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <div class="post-meta"> <span class="meta-date"><?php _e('By', 'wpzoom') ?> <?php the_author(); ?></span> <span><?php edit_post_link( __('Edit', 'wpzoom'), '<span>', '</span>'); ?></span> </div> <?php if ( option::is_on( 'display_excerpt' ) ) { the_excerpt(); } ?> <?php if ( option::is_on( 'display_readmore' ) ) { ?> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="more-link" rel="nofollow"><?php _e('Watch Now', 'wpzoom'); ?> »</a> <?php } ?> <div class="clear"></div> </div> </li> <?php endwhile; ?> </ul> <?php endif; ?> <?php endforeach; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Authors Page is not displaying all posts of author’ is closed to new replies.