Author posts not appearing for custom post type in WordPress

Posted by Prem Tiwari | Updated on

Author posts not appearing for custom post type in WordPress. I managed to resolve this issue by using pre_get_posts function and adding the custom post type to the main query.

I added the below to my functions.php file and now I get results for authors in my custom post type:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers