Create the Books Custom Post Type

In this lesson, we create a Books Custom Post Type using ACPT Pro for author websites, detailing steps from registration to configuration, ensuring easy book content management.

There are up to 4 stages to build a Books Custom Post Type for an author website.

  1. Number 1. Create the Books Custom Post Type in ACPT Pro.
  2. Number 2. Add supporting custom categories for one or more series. If you only publish standalones you can skip this stage.
  3. Number 3. Create custom fields for our book specific content inside ACPT.
  4. Number 4. Build a Books Post template in WordPress and associate it with the Books custom Post type.

In this lesson we will start the process by creating our Books Custom post type in ACPT Pro.

Register Books Custom Post Type

First we will register our Books Custom Post Type.

  • From the WordPress admin dashboard go to ACPT then Custom Post Types.
  • In the main ACPT Dashboard you’ll see we already have two entries in the Registered Custom Post Types. One for page and one for post with both marked as native.
  • From the main ACPT dashboard we can run the following operations.
    • Manually sync post types.
    • Create a new custom post type.
    • Update an existing post type.
    • View a registered post type.
    • Delete a registered post type.

We’ll cover these operations in different lessons but we will start by clicking on REGISTER NEW POST TYPE.

There are 3 sections to complete to register a new post type. 

  • Minimum Configuration.
  • Additional Labels.
  • Other Settings.

Minimum Configuration

We have to start with MINIMUM CONFIGURATION.

  • We are going to call the Post name ‘books’. This is the name that will be used in the URL so we’ll keep it lower case.
  • The singular label is Book. Used only in the admin panel when a singular label is needed. I’ve written this in sentence case. 
  • Plural label is used only in the admin panel for the menu item. I’ve added the label of Books in sentence case.
  • Next we are going to choose an icon that will be used on the WordPress admin menu. If we take a look at the existing admin menu we can see that POSTS has a PIN icon. For our Books post type we can either use one of the available icons or upload a custom Icon. I’m going to use a Book icon from the range of available icons.
  • Under SUPPORT we define which features of the content edit screen we will use for this post type.
  • A regular content edit screen for a WordPress post looks like this.
  • We want the Books Content edit screen to look like this.
  • Having the Content Edit Screen structured like this makes it a lot easier to add new books because we are filling out a form with information we already have.
  • We get this structure by what we configure in our settings here, and in the next two lessons where we add custom categories and custom fields.
  • Here in the support section of setting up our Books Custom Post type we set what content editing features we want to use on these posts.
  • It’s worth having a rundown what each of these features are and why I choose to use them or not.
    • Title is the title of the post. For our Books post this will be the book title so we definitely want that.
    • The editor is this big content area we’d normally use for adding blog posts but that’s too free form for what we are doing here. Our Book posts will get all their content from the custom fields we’ll create in a later lesson.
    • Thumbnail is for the book cover we will use as our featured image so I’ll tick that.
    • Excerpt is a summary of the post that we will use for post listings and archive displays around the site so we will tick that one as well.
    • Author displays the name of the author of the post, not the book. This is normally used in metadata but we don’t need it for our book posts.
    • Trackbacks are a way for other websites to let you know they have linked to this post. The problem is most trackbacks will be from spam sites. If you tick this box you will spend a lot of time approving, deleting, or marking trackback comments as spam. Please don’t tick this box.
    • Custom Fields. WordPress has a built-in custom fields feature which is great! However the only way to display these native custom fields is with code. That’s why we will use custom fields from ACPT so I will untick this option.
    • I’m not using comments on this website so I don’t need that feature on this custom post type.
    • Revisions are great for keeping multiple versions of a post but I don’t recommend editing content inside WordPress. That’s much better done in a dedicated text editor and I’ll show my workflow for that in a later lesson. I’ll leave Revisions unticked.
    • Page attributes are used to set parent pages and change the order of your pages. We will not be doing either of those so this option is unticked.
    • A post format is a piece of meta information that can be used by a theme to customise its presentation of a post. We are going to use ACPT to manage everything about the Books custom post type so this feature is not used and unticked.
    • That’s all the minimum configuration completed so we’ll click the next step.

Additional Labels

In the Additional Labels section we set how we want the custom post type labels  to appear in the WordPress admin dashboard area.

  • After completing the Minimum COnfiguration section ACPT will automatically populate the fields in the additional labels section.
  • Editing Additional Labels is optional.
  • I’m only going to change the ‘Menu Name’ and ‘All items’ to the plural and leave everything else as the default.
  • Click Next Step.

Other Settings

  • This is an advanced area of custom post types. Fortunately ACPT sets the defaults that fit most custom post types including this one!
  • It’s out of scope to go into all the advanced custom post type settings of ACPT but you can get full details from the documentation linked in in the lesson notes.
  • We have all the settings we need for our Books custom post type configured. I’ll click save and return to the ACPT dashboard.

If I refresh the main WordPress dashboard you’ll see we have our Books icon over in the navigation bar. When I hover over this we get the options to see All Books or Add Book. When I click on Add Book we get a severely cut down content edit screen. That’s ok. That’s exactly where we should be until we build our Books custom post type with all its superpowers.

Summary.

In this lesson we have created our Books custom post type and registered it with WordPress. Although the content edit screen is a little sparse right now we’ve taken a huge step. We have now defined a dedicated post type for our books which, as you’ll see by the end of this module, gives us total control over how our book posts will look without affecting the rest of the site.

Call to Action.

I hope you’re enjoying the course so far? If you have any questions, comments or feedback I’d love to hear them. Click on the Contact link below and let me know via your preferred channel.

Stephen Gordon Profile Image 425x425
Photo Credit: Mark Hudson

Lesson by

Stephen Gordon

Founder of Writers Building Websites and a digital marketer with over a decade of experience specialising in website based sales funnels. He is also the author of the upcoming Cursed World post-apocalyptic series of books.