Query posts for Author shows posts of all authors
-
Hello everyone,
I noticed that since WP 5.7.1 the query posts targeting the author is now displaying the posts of all authors on the Author’s page, not sure if this is possibly linked to a plugin conflict or the WP core files, but one thing for sure, when compared to a WP 5.7 using the same theme and plugins, this issue is not present.Has there been a change in the way the custom posts and regular posts are pulled?
This is the code that pulls custom posts by the Contributors and the WP native blog posts usually posted by the Admin:
<!-- pull custom taxonomy posts --> <?php query_posts( array( 'post_type' => APP_POST_TYPE, 'author' => $curauth->ID, 'paged' => $paged ) ); ?> <?php get_template_part( 'loop', 'ad_listing' ); ?> <!-- pull blogy posts --> <?php if ( $author_posts_count ) { ?> <?php query_posts( array( 'post_type' => 'post', 'author' => $curauth->ID, 'paged' => $paged ) ); ?> <?php get_template_part( 'loop' ); ?> <?php } ?>
If no changes should be affecting the code above, I will look into other sections of the theme to see what could be the root cause, but I would appreciate your feedback in case there’s an issue.
Thank you.
- The topic ‘Query posts for Author shows posts of all authors’ is closed to new replies.