Site logo

Archived topic

custom post type creation

1 reply · Started by Derek Binion on December 21, 2015

Viewing posts 1–2 of 2

Tom, I'm using a GP child theme and I want to make a Review post type with a copy of the post.php
I really don't want any more plugins installed and I surely don't want to use any other theme. It's time for me to get my hands dirty. can you recommend anything that will help with my making of this post type using Generatepress?

Hi Derek,

Making a custom post type in GP is the same as any other theme.

First you'll want to create your custom post type: https://codex.wordpress.org/Post_Types

You would add your PHP code into the functions.php file of your child theme.

Then you'll want to copy a file like single.php and add it to your child theme, and rename it: single-posttypename.php

That's the file where you can build the template handling the post type functions.

If you don't add the template file, your post type will use the core single.php file.

Let me know if you need more info :)

This archived topic is closed to new replies.