Get all the registered Post Types in WordPress

How to Get all the registered Post Types in WordPress. This is a small piece of code to retrieve all registered post types in WordPress. When ever if you want to know what are the post types registered in WordPress. Just add this code to any theme files.

Add this code to header.php or footer.php in Theme files.

$post_types=get_post_types(); 
print_r($post_types);
Posted in WordPress

Leave a Reply

Get Latest Updates to Your E-Mail

Contact Us

If you have any quick question, or if you want to learn any web technologies, I'll provide online training. If you have any project related issues also i can help you.

captcha

Follow us on Twitter

Like us on Facebook

Connect With Us

Visit Us On TwitterVisit Us On FacebookVisit Us On GooglePlusVisit Us On PinterestVisit Us On YoutubeCheck Our Feed

Archives

Close
Please support the site
By clicking any of these buttons you help our site to get better