WordPress FAQ

How to Add Custom Post Types in WordPress

Adding custom post types is best achieved via the register_post_type function in functions.php or by using the Advanced Custom Fields plugin. medium confidence based on 8 community reports

Adding custom post types is best achieved via the register_post_type function in functions.php or by using the Advanced Custom Fields plugin.

Based on 8 community reports.

Linked sources: 8.

Known Issues

Community Q&A

How do I enable Gutenberg for a custom post type?

You can enable the block editor by adding ‘show_in_rest’ => true to your register_post_type arguments in your functions.php file.

Do I need a plugin to create custom post types?

No, you can register them manually via code, but plugins like ACF or CPT UI simplify the process for users without coding experience.

Where should I add the custom post type code?

The code should be added to your child theme’s functions.php file or a custom functionality plugin to ensure changes persist after updates.

Reddit Sources