post_types.add

/ Utility / post_types.add

It allows us to register custom post types for WordPress. It is a shorter alternative for more detailed register.post shortcode.

It takes the following parameters

main: the post type slug you want to register
singular_label: the Singular Name for the post type.
plural_label: the Plural Name for the post type.
desc: Description of why or what this post type does.

Here is how to register a public post type

and to register a private post type we can use

It sets the following parameters while registering the post type

Important: You can only use this shortcode in the register module of Awesome Core.

Categories
Most Popular

Leave a Reply

Your email address will not be published.