How to get all posts from a custom post type?

Posted by Editorial Staff | Updated on

If you want to get the all all posts from a custom post type in WordPress, then you are on write page. Use the below code snippet to get all posts from custom post type.

How to get all posts from a custom post type?

You can use wp_query() function to achieve this.

You can find the complete documentation for WP_Query https://codex.wordpress.org/Class_Reference/WP_Query

That’s all, we hope this helped you!


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