Support

Account

Home Forums General Issues ACF Makes Custom Post Types Obsolete? Reply To: ACF Makes Custom Post Types Obsolete?

  • Here is the reason you need custom post types–not always, but sometimes.

    It’s MUCH easier to display content from custom post types elsewhere on your site (that is, not on the page where you entered the content) than it is to display custom fields elsewhere.

    I discovered this the hard way: I set up a repeater field group for “Careers” information. The field names were “job title”, “job description”, and “info link.”

    Displaying three sets of these on the original page–no problem. I followed the instructions for looping through repeater fields and it worked fine.

    But I wanted to be able to display JUST the custom field content elsewhere on the site. After EXTENSIVE trial and error (I’m not that great a developer), I was able to create a page template that looped through all the posts that had career fields and displayed just the field info.

    The problem was that I wanted to sort by job title, not by post, and there were three careers per post. It may be possible to do this with ACF, but according to my Real Developer husband, it would be hugely resource-intensive to do so.

    So instead, I created a Career custom post type with ONE custom field (for the info link) and PRESTO! It was extremely easy to create an archive page for Careers that listed careers alphabetically. It was also easy to create a post page template to show 3 career entries with the same taxonomy as the post. AND I can easily display careers in widgets. (It’s a Genesis theme.)

    So that’s really why you need custom post types (which may have ACF fields in them): when you have to be able to display the content in different ways in many places in your theme.

    For me, at least, rolling a custom post type and taxonomy is a heck of a lot easier than working out ways to display fields, too. WordPress just doesn’t support field retrieval in the same ways as post content retrieval. ACF helps make it easier, but is still limited by the fact that all your ACF data goes into the post_meta table.