From the course: WordPress: Custom Post Types and Taxonomies
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating a post with your post type - WordPress Tutorial
From the course: WordPress: Custom Post Types and Taxonomies
Creating a post with your post type
- [Instructor] Now that our business post type is created, let's see how it works, both in the admin, and on the front end. If we go to Businesses, Add New, you can see that we have the block editor. So we can add a title, so let's add the business Leaf and Mortar, and then we'll add some text to the block editor area, and we can click on the Document tab over here, and add a logo. If we click Publish, we can then view the post, but notice that we're getting a 404, even though we just published. That's because we haven't told Wordpress to update the permalinks to include the rewrite rules we set in our custom post type settings. The way that we can do that is by forcing it on the permalinks page in the admin. So we'll go to the Dashboard, and then go to Settings, Permalinks, and we'll click Save Changes. Now, if we go back to our Leaf and Mortar post, we can see everything is working properly. And if we go to /businesses, we'll see our archive page is showing up properly as well. One…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Creating your plugin3m 16s
-
(Locked)
Building a basic custom post type5m 37s
-
(Locked)
Customizing your post type labels4m 51s
-
(Locked)
Customizing your post type settings3m 13s
-
(Locked)
Activating the REST API on your post type1m 54s
-
(Locked)
Creating a post with your post type1m 56s
-
(Locked)
Challenge: Create an events post type1m
-
(Locked)
Solution: Create an events post type2m 21s
-
(Locked)
Extending post types with custom fields2m 14s
-
(Locked)
-
-
-
-
-