June 5, 2014 by Nitesh

How To Get All Custom Post Types in WordPress

Friends,

WordPress allows users creating Custom Post Types to extend the WordPress functionality more than just a blogging platform. This post will explain how you can list all the custom post types registered with your WordPress installation by different plugins/theme.

$args = array(
              'public' => 'true', '_builtin'=>false
        );
$terms = get_post_types($args);
foreach($terms as $term) {
    echo $term."<br />";
}

Keep Learning and sharing!Cheers!

#Custom Post Types#PhP#WordPress

Support us!

If you like this site please help and make click on any of these buttons!

Powered by WordPress Popup