Advanced Custom Fields vs Custom Post Types: Which One Should I Use?

Advanced Custom Fields vs Custom Post Types

There are many ways to customize content in WordPress. Two of the ways that I use most often are Custom Post Types and Advanced Custom Fields. Let’s look at how to maximize the use of each of these tools.

Meet The Contenders

Advanced Custom Fields is a plugin that allows you to take full control of your edit screens and custom field data. The free version has many of the features of the Pro version including text, page links, and a date picker. Perhaps the most helpful field type available at the Pro level is the Repeater field.

Custom Post Types are a built-in feature of WordPress. They allow you to group information together in a logical way to be reused on your site. Some examples would be events, locations, and testimonials.

Advanced Custom Fields Use Case

On a recent project, I used Advanced Custom Fields to create cards that would be displayed on the home page. The design and layout of the site changed mid-project and required the cards to be placed on a different page. Since information stored by Advanced Custom Fields is specific to the page/post it is added to, I was going to need to re-enter it on the new page.

Instead, I deconstructed the Advanced Custom Fields and put them within Custom Post Types. That way, I could move them to the new page, and, should the need arise, they could easily be moved again.

Custom Post Types Use Case

Another project required event sponsors to be repeated on multiple pages. Using Custom Post Types, I created a page dedicated to the sponsors. I was also able to easily reuse portions of the post in other places.

Conclusion

What I’ve found is that Advanced Custom Fields is best used when you need to edit specific content beyond what simple HTML and/or shortcodes could accomplish, or if you need to ensure the content stays within the confines of the page structure that’s been created. Custom Post Types should be used when the content may need to be used across multiple areas on the website or if the content could possibly move to another page in the future.

Leave a Reply

Your email address will not be published.