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);

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Posted in WordPress

Leave a Reply

Latest Updates

Get Latest updates through email

[adrotate group="2"]

Archives

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