Fill the Plural Label, Singular Label and Post Type Key. If you'd like to follow along, then make sure you’ve got the ACF plugin v6.1 or later installed and active.Ĭontinue by visiting ACF -> Post Types in your Admin Back-end, here you’ll see a screen with the basic settings for a new Custom Post Type (CPT). Register a Custom Post Type in ACF # link copied When the Custom Post Type is registered correctly, you will find the "Companies" in the admin menu. 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments',), This PHP snippet below is placed within the functions.php, file inside your theme directory. Where the "Company" is actually a Post Type we've registered in our theme. So we can have a Post, a Page, Attachments, Company and Images etc, they're all considered Post Types. When you look at the 'wp_posts' table, you'll notice that every entry has a 'post_type'. Now let's take a look at what Custom Post Types are. That's all you need to know about Post Meta for now. Then you'd need to add it in the 'wp_postmeta' database, and not in the 'wp_posts' table. When you need to add a characteristic to a Post or Page or another Post Type. So in these rows of data are associations to Post ID's, and they're considered characteristics of the Post, or Page etc. Each entry in this table has a key and a value, and we can associate this pair to any Post ID. In this table we have 'meta_id', 'post_id', a 'meta_key' and a 'meta_value'. The Post Meta is saved within a separate database called 'wp_postmeta'. That just isn't possible, and this is where Post Meta comes in. And therefore we cannot add another column and name it what we like. So, every entry has the same exact structure, which is defined by the structure of this table. In this case, we have chosen Advanced Custom Fields (ACF), which is one of the best plugins for managing meta fields and Custom Post Types (CPTs). So with that in mind, we always try to use as few plugins as possible. So always try to reduce the number of plugins, and use only well supported plugins, which is an important aspect of WordPress speed optimization. Then you probably know that every single plugin you install affects your site. There are ways to create a Custom Post Types (CPT) using code or other plugins, but when you’re a veteran WordPress web developer or designer. It therefore quickly becomes obvious, that yes you need a way to define different types of content, and with that to assign some extra fields that’s specific to that content type. Now you need an extra field for the logo, but again this logo isn’t applicable for use on other content. What if the “company” post already uses the ‘Featured image’ for the profile cover. Then consider this, what if some content needs an extra sub headline field, or still on the business directory example. You’ve decided that you’re going to just use the built-in posts and that’s that.