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

Creating a post with your post type - WordPress Tutorial

From the course: WordPress: Custom Post Types and Taxonomies

Start my 1-month free trial

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…

Contents