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 your plugin

Creating your plugin - WordPress Tutorial

From the course: WordPress: Custom Post Types and Taxonomies

Start my 1-month free trial

Creating your plugin

- [Instructor] As we write the code to add custom post types and taxonomies to our WordPress site, there are two tasks we need to accomplish. Add the code for our custom post types and taxonomies, and modify our theme to add templates for the newly created custom post types and taxonomies. These new post types and taxonomies will go in a separate plugin. Which will be used to control the content. This ensures that our code is theme agnostic, or at least the parts that can be. Open up your favorite code editor and head over to /wpcontent/plugins in your WordPress development site. Now we're going to create a folder in the plugins folder called lil-post-types. Anytime we need to prefix something, we'll use lil for LinkedIn Learning. Inside of the lil-post-types folder, we're going to create a new file with the same name. Lil-post-types.php. This will be the driver for our plugin. The first thing we'll do is write the opening PHP tag and then add our plugin definition comment block…

Contents