Cyber Week Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

custom post type creation

Home Forums Support custom post type creation

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #161336
    Derek Binion

    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?

    #161447
    Tom
    Lead Developer
    Lead Developer

    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 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.