What is a hierarchy in post types? How do you use it? Let’s talk about it and how to check for it.
Just as you can add a post type feature, you can also remove one from an existing (registered) post type by using remove_post_type_support(). Let’s say your project needs to remove the featured image from a particular post type that you did not register. You would use this construct to remove it. Let’s go and give it a try.
WordPress gives you the ability to add post type features to existing (registered) post types. You can add any of the built-in features as well as create your own. Why? Why would you want to do this? Maybe your project needs to add one of the features to an existing post type that is either in WordPress Core or some other plugin such as WooCommerce, Ninja Forms, bbPress, BuddyPress, or others. Or maybe you want to add a new one, such as the Genesis framework does. In this episode, you’ll add new features to post and page. And then you’ll […]
When you register a post type, you configure which features are supported. WordPress provides the following post type features: title editor author thumbnail excerpt trackbacks custom-fields comments revisions page-attributes post-formats In this episode, you will learn about the post type features that are built into WordPress. You’ll go into WordPress Core and look at where it registers post, page, and the other built-in post types.
There will be times when you need to grab all the registered post types. Using the WordPress construct get_post_types(), you can specify what you want. For example, you fetch all of the custom post types, built-in ones, or all of them. In this episode, you’ll work with this instruction and go into WordPress core to see what it does for you.
In this episode, you will learn about what a “post type” is within WordPress. You’ll look in the wp_posts database table to see the column named post_type. You’ll see how this column relates to the buckets of content.
Let me introduce you to what we are going to do together in this lab. Make sure you have a sandbox site spun up and the starter plugin. You’ll need both of these to do this hands-on lab with me.
Out-of-the-box, WordPress gives you built-in post types. In this hands-on lab, you will interact and change the built-in post types including the configured features. This is an introduction to post types, which will prepare you for building custom post types.
WordPress gives you the means to add new post types. In this hands-on lab, you will explore configuring and registering a new custom post type. You are actively building a team biography plugin, where team members are displayed on a business-centric website.
In this episode, you will walk through the remaining configuration arguments. You’ll add a different menu icon, adjust the rewrite slug, remove it from the menus and admin bar, enable the archive, and more. Most of these you will not need to touch. However, you need a good overview to see what is possible. You can follow along in WordPress codex.