Writers Building Websites

Writers Building Websites

Set Up a Books Field Group in ACF for WordPress

In this lesson, we set up the Books field group in ACF for author websites, associating it with the Books custom post type ready to add our custom fields.

Last Updated: 10 December 2024

Introduction

Creating a Books field group in WordPress is a crucial step in building a professional author website. In this lesson, you’ll learn how to set up a Books field group using Advanced Custom Fields (ACF) and associate it with your Books Custom Post Type. This field group serves as the foundation for adding custom fields, allowing you to organise and manage book-specific information effectively. By completing this step, you’ll prepare your website to showcase your books in a dynamic and engaging way.

What is a field group?

Field groups are containers for custom fields.

When setting up an author website we create a new field group in ACF, associate it with our Books Custom Post type, and then add our custom fields to the group. 

Create the Books Field Group

I’ll start by creating the Books field group.

  • From the WordPress admin dashboard go to ACF then Field groups.
  • Click on the + Add Field Group button
  • I am going to edit the FIELD GROUP TITLE and call it Books Field Group
  • I’ll scroll past the FIELDS meta box to SETTINGS
  • Under LOCATION RULES I’m going to show this field group if the post type is equal to Book.

This setting means we will only see the custom fields we create for this Field Group inside Book posts and not in regular posts or pages.

  • Click SAVE CHANGES

Update the book

When we edit the Adventure Danger book post there isn’t much to see yet. Just a Books Field Group meta box with an empty field that doesn’t do anything. That’ll all change as we add our custom fields.

Summary

This lesson guided you through setting up a Books field group in ACF and associating it with your Books Custom Post Type in WordPress. This field group acts as a container for custom fields, streamlining the organisation and display of book-specific data. With this structure in place, your website is ready to handle additional fields and customisations, ensuring a user-friendly and professional presentation for your books.

Stephen Gordon
Stephen is the founder of Writers Building Websites and brings over a decade of experience as a freelance marketer specialising in publishing. He is also an author.

Index

Copyright © 2024 Writers Building Websites | All Rights Reserved.