Setting Up a Simple Custom Post Type

Here are the quick steps to take when implementing a custom post type in GeneratePress.

1. Register your custom post type

You can either use the full method WordPress provided here:

Or a use one of the tools like these:

This sets the parameters of what the CPT can do, the slug for the templates to be used and where its displayed in the Dashboard Menu.

2. Acquire the templates

Take a copy of the single.php and the content-single.php, then rename them to they match the slug of your CPT tag like single-project.php and content-project.php.

3. Update the single-project.php file

In the single-project.php file, replace this line with the following:

get_template_part( 'content', 'project' );

4. Edit the content-project.php file

Now you are ready to edit the content-project.php file if you need to adjust the structure at all.