


Forget Big Apps. These Tiny Tools Are Making Millions

He Makes $3M/Year From Tiny AI Tools (Here’s How You Can Too)

My AI agents scrape Google Maps to make $$ in BORING businesses

n8n Full Course: How to Build Custom User Interfaces (Step-by-Step)

Complete Guide to Making Money with MCPs
Hey what's up everyone WordPress has its Default post type which is great for Posting on a Blog but what if you want To add a different post type to your WordPress site [Music] The first way we're going to create a Custom post type on our website is by Using a plugin called WP codes and then Adding some custom code to that now I Know what you're thinking did he just Say I'm going to add custom code to my Website what if I've never done it Before and won't I break my website well The great thing is the wp code has been Built with these questions in mind is Easy to use and comes with a whole Library of tried and tested code Snippets to help you open up the Functionality of your WordPress site With no coding knowledge needed let's Check it out so to get started all we Need to do is install WP code on our WordPress site to do that we just need To head over to plugins here on the left Hand side hover over that and click on Add new There are on the app plugins page we Just come up here to the search bar on The top right click on there and type in WP code this is WP code right here and All we need to do is click on the Install now button that's going to Install the plugin
And once the plugin is installed that Turns to an activate plus and just click On that now we can see WP code is Installed and activated on our website So now let's take a look at WP code so We're going to come over to code Snippets here on the left hand side of The screen and click on that so this is The main screen of the wp code plugin Dopey code is a code Snippets plugin Which allows you to add lots of Different functionality to your WordPress site through adding little Bits of custom code to add custom post Types to our site all we need to do is Head up to the add new button up here Click on that and that brings us to the Code snippet library and there are lots Of ready-made code Snippets ready to use In this library that are tried and Tested I totally encourage you to check Them out to see if there's something There that you'll be able to use on your Website for this video we're going to Add custom code to our website so we're Going to click on the add your custom Code new snippet here so that's opened Up the custom code snippet editor the First thing we need to do is add a title For our snippet I'm going to call mine Custom post type when I've done that I'm Just going to click the toggle here to Activate it so that it'll be active once I save the snippet on this website in
The code preview section here what we Need to do is change the code Type to PHP snippet because that's what we're Going to use for this custom code I've linked to the blog article in the Description below of this video click on That link and that'll bring up the Article in a new tab just like this and This article then has the code snippets On them for you to copy across so our First code snippet here is a more Simplified version of a custom post type So we're going to copy that across to Our WP code plugin so now we're back in WordPress under the code preview section We're just going to paste that code in It's just telling us that we're going to Create a custom post type right here the Post type that we're creating is a movie Section to the website for us to be able To create posts under that heading there Are options other than that's the label Name that we're going to be using for This is movies so we can change that to Whatever we were like so if it was Portfolio photos a different section to The website where you want separate Posts you just change that to whatever You want singular name is movie and then Underneath that A few different options so do you want It to be a public post type has an Archive so that all the posts can be Displayed on page together we're going
To have that as true and underneath that There's a section here to choose to slug So what shows up as in the URL so it'll Be our website forward slash movies Forward slash whatever the post is And that's the simplified version of the Post type so we're just going to click Save snippet to save those changes and Once we've saved that we can see there's The movie section has shown up here on The left hand side if we click on that We can now see that this is the movies Section of the website and we can add New posts in there if we go back to our Code snippet we can see that our custom Post type snippet is right there on the Screen and its status is toggled to on We can disable it by toggling that as Well if we want to to edit it we can Click the edit link underneath the Custom post type and now let's add in The more in-depth custom code and have a Look at that if we head back to the Article we scroll down slightly this is The code we want right here so we're Just going to grab that copy that Head back to WordPress if we grab all This code and delete that and post in The new code just before we update it We'll go through it a little bit so this Gives us a little bit more options about How it looks and we can change the Different options for it so using the Movie's theme we can set the UI labels
For the custom post type so that's what We see up here in the on the left hand Side of the screen so the name of that Section is movies change it to whatever We want singular name is movie menu name Up here is movies two and then as you go Down you can change all these to Whatever you want them to be In this section here we can change the Label description of this custom post Type and then the features this custom Post type supports in the post editor so When we create a post underneath the Movie section this will then support These features when we're creating that Post with this custom post type we'll Get the option to add a title choose the Editor add an excerpt the author add a Thumbnail to it as well allow comments And then multiple custom Fields if we Create more custom Fields as well And here are a few more options that we Can change to really customize this to What we need for our site Once you're happy with that click update That's that snippet updated there and as You can see the movie's custom post type Is there as well and we can add as many Of these to the website as we need so if You've got different sections that you Need different posts under and I suggest Using this method to add those in now in Our second method we're going to add a Plugin called custom post type UI to our
WordPress site and that's a dedicated Plugin for creating custom post types Let's check it out to add the custom Post type UI to our website we just need To install it so we're going to go over To plugins here on the left hand side Hover over that and click on add new and In the search bar up here on the right We're just going to write custom post Type this is the plugin we want right Here custom post type UI by web dev Studios click the install now button to Install our plugin now that plugins Installed click the activate button to Activate it and now we can see the Plugin has been installed and activated On the website let's check it out so Here it is on the left hand side of the Screen just click on CPT UI and that Brings us to add and edit post types Diving straight in the underneath the Those types like here we choose the name Of what we want to see in the URL we'll Use movies as the example for this then We can choose the plural type label so It's got movies The singular type label And once you've added those in you could Add the post type to the website so once We've done that we can see the movies Section is on the website and we can add A post to it and that'll be headed Underneath that section if you go to the Custom post type UI so if we want to
Change the settings of our custom post Type that we just created go to edit Post types you can select the post type That you want so we've just got movies We're going to select that so underneath These basic settings here are the Additional labels so we scroll down a Little bit we'll be able to take a look At them So we can add in a post type description So we can put into detail what this post Type is used for then below that are Options to change the different labels That you see across WordPress for this Custom post type So currently its menu Name is movies at the moment but we Might want to change that to my movies When we click on the movies section we See an add new button but we can change That to add new movie we can also change Any of the other labels below that as Well we saved that post type now we can Now see it's changed to my movies on This side and if we hover over we can See we can add new movie and that's to Post a new movie to that section of the Website so below the additional label Section we can now see the custom post Type settings so each one of these has a Little bit of a description to let you Know what each one does just to go over A couple we can change whether this the Custom post type can be shown publicly On the website
And also whether it can be shown in the Navigation menu we scroll down a little Bit So we can choose the menu position And we can also choose The dash icon that comes up by the post Type We can change it to a media type Dash Icon and if we save that you can now see That's changed Back to that section And then just below that in the support Section we can choose what features are Supported in this post type so at the Moment I've got the title we've got the Editor for it and a featured image you Can also add in whether we've got any Custom Fields so we can choose them we Can show the author and also maybe an Actor as well So once you're happy with that you just Save the post type and then your post Type is ready to use and you add posts To it now that we've created our custom Post type there are a few ways that we Can display on our site we can add it to Our site navigation we can add it to the Front page and we can also use a widget To add it to the sidebar I'm going to Check each one of those out quickly now Once you've created a couple of posts Under your custom post type then you'll Probably want to display them on your Website and make them easy for your
Users to find to do that what we're Going to do is we're going to add a Custom post type as a link to our Navigation menu to do that first we need To check our power link settings on our Website so head over to settings here on The left hand side hover over that and Then click on permalinks so what we're Looking for is for our permanently Instructor to be under post name and That makes it super easy to add it to Our navigation menu if you do have a Different structure to your permalinks And it's a site that's been going for Some time you probably don't want to Change this now because it could damage Your SEO but the post name time link Settings does have added benefits for SEO if you're starting a new site so I Definitely recommend using that once You've chosen that click save changes Once you've done that we can head to Appearance hover over that and then Click on menus so now we're on the menu Settings section of our website we need To add this custom post type to the menu So as you can see we've got different Pages on our menu Underneath the add menu items here we Can choose any of the pages that we have It's not a page that we're adding to it We're going to add a custom link so We're going to toggle that down Now we need the URL for our custom link
So we're going to copy the website URL Paste that in and then after the forward Slash you're just going to type in Whatever your url slug is that you chose For your custom post type mine was Movies and underneath that we can choose The link text so link text is something That's going to show in the menu Structure here I'm going to choose Movies I'm going to click add to menu Now that's added it to our menu and we Can drag that to wherever we want it Once we're happy with that we can click Save menu so now if we head to our Website and then we click on our movies Section in the navigation menu that will Then bring up our movie archive for our Custom post type if you want to display Your custom post type on the front page Of your website that's fairly Straightforward too all we need to do is Head to code Snippets once we're in WP Code we can click on add new to add a New snippet to our website add a new Custom code click on that give the code Snippet a title toggle it to active Changes code Type to PHP And then Use the link in the description below to Go to the article link to this video Once you're on the article you want to Head to the display custom post Types on Your site section scroll down a little Bit
And then under the display custom post Types on the front page if you want to Copy this code And then head back to WP code and add it To your code preview I can leave all the Other settings as they are and then just Save the snippet now that snippet's been Saved if you go to the website and there You can see your custom post type posts Displayed on your website front page if You want to display your custom post Types with a widget in a sidebar or Something like that you can definitely Do that too and we can do that by Installing the custom post type widgets Plugin to our WordPress site to do that We're going to head to plugins hover Over that and click on add new in the Search bar up here we're just going to Write custom post type widgets And this is the custom post type widgets Here that we want to install so we're Going to install click install now then We're just going to click the activate Button to activate that Now we can see that's activated on the Website so all we need to do now is go To appearance over here hover over that And then click on widgets Now we're in the widget section of our Website we can see that we've got Nothing in our main sidebar here we can Click on this add block button right There in the search bar we just want to
Search for custom post type as you can See it brings up a few of different Options the one we want is right here Recent posts custom post type let's drop That into our main sidebar here we're Just going to give this widget a name Recent movies I'm going to choose the Post type To be movies It's a custom post type we've just Created number of posters show we'll Just leave it as that and we can choose To display the post date as well so Click update up here in the top right to Save those changes and then if we head To our website we should be able to see In the sidebar here we can see the Recent movies in our custom post type Widget so now you know how flexible and Adaptable WordPress can be by adding Custom post types to your website WordPress actually has a lot of hidden Functions that can't be accessed unless You add custom code to your site that's Why WP code is so awesome with its Library of code Snippets that are tried And tested for you to check out and use On your site if you want to find out a Little bit more about WP codes check This video out next thanks for watching
