Pods vs Metabox - Part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right well for those early birds who are just showing up now we will begin in just a few minutes i've got our little countdown timer going this is being streamed both in over on youtube as well as on facebook so no matter what you are trying to jump in on the call for welcome so a little over four minutes to go we'll get started right at the top of the hour for those of you who stumbled your way over here or you somehow had subscribed to the youtube uh the wp studio youtube channel or the facebook page and you just saw that there was an event today this is actually a three-parter which we will get started at at the top of the hour in just a few minutes when the countdown timer gets down to zero is when we will start we're just having a little chat and conversation during the pre-show we're going to spend the next three days looking at the similarities the differences advanced functionality how to go beyond just the basic implementation of pods as well as metabox but we'll get into that as soon as we get started i'm just going to move a few things around here on the broadcast desk make sure everybody can [Music] see [Music] all right again just a little over two minutes to go whether you're chatting or asking questions on youtube or facebook i should be able to see all of the chats across the different networks if not we'll work out the kinks as we go that's kind of how we do it here at wp studio we do everything live figure things out as we go all right just a little over a minute to go before we dive into our first of three free trainings here at wp studio which has been broadcast out to youtube and facebook i'll explain what we're gonna be doing for the next three days each day at two o'clock feel free to subscribe follow like whatever whatever you normally do on a facebook or a youtube channel so that you can be alerted to upcoming events that way you can also get alerted to when i go live for free events and i'll talk a little bit more about wp studio as well all right just a few seconds to go here there may be a slight delay for the rebroadcast so it might say it might not say two o'clock at your time but it is two o'clock where we are broadcasting from so good afternoon everybody welcome back to another live event here at wp studio uh we're mixing things up this summer so normally all live training events occur over at wpstudio.com and it's been that way for a number of years and there's just on that website alone there's a library of over 400 hours of live training events that we have done that's all part of the membership we'll talk more about that later but today is day one of our three-part comparison and whether you want to say it a uh a combat by trial because we're going to be building multiple things on wordpress using both pods and we're going to look at the similarities and differences of pods it's a free wordpress plugin if you have never seen pods before you are in for a treat when we take a look at how pods works with wordpress and how you can extend the functionality of wordpress without being a massive coder and we are going to compare that to meta box now the reason why we're going to be using these as direct comparisons uh between these two items you know in our pods versus metabox is because these are unique solutions that are built on top of wordpress that extend wordpress now many of you may have heard of other tools advanced custom fields maybe you have heard of other types of uh custom post type creators that you use in wordpress the reason why we are focusing on meta box and pods is because metabox and pods combines the custom post type creation which we'll take a look at in just a moment it combines the custom fields these adding additional fields beyond like a title or a content which we'll see in just a moment and it has complex templating so because those are the two areas or three areas that's why we're not really looking at advanced custom fields other popular plugins that you might use because for many of them to really get the implementation that we are going to do today tomorrow and wednesday you'd have to dive into some php code you'd have to dive into a theme you'd have to dive into a functions.php my goal is to teach you how to do some advanced things without having to go advanced i don't know if that makes sense hopefully it will by the end of these three uh sessions so let me uh just clean up the screen here because we are going to be diving back and forth between meta box and pods we're probably going to spend a lot of time today on pods but i didn't want you guys to be left with the current version of pods because you might if i just did the current version of pods you might walk away saying oh well i am definitely going to start using metabox because it can do so much more and i have so much more control that's true but there is a new version of pods coming out and it's pods 2.8 it is very close to being done you can actually come and download the latest beta version uh to test it out and that's what we're going to be doing today now in order to get this beta version sure you could go over to the pods github repo and again pods is free so you can just go grab it either at the github repo or by going to pods.io the best way to do that is go to pods.io take a look at the blog the first blog post that you will see and in this post you will see a direct link to the pods 2.8 beta zip file now if you currently have a website that uses pods and you want to try out some of the things that we're going to talk about today you can do that but there's a little trick so i have a new test site that we're going to play around with over here that has a number of the plug-ins that we're going to use over the next few days but you'll notice how i have both pods 2.7 and pods 2.8 installed on the site only one of them can be active at a time you can't have both of them active otherwise you will have issues so what we've got going on here is i went ahead and deactivated my current version of pods and activated the beta version one thing to know if you're unfamiliar with how wordpress stores the database of all your custom post type it's perfectly fine to deactivate pods and then reactivate it you're not going to lose anything you're not going to lose your custom post type stuff in fact on wednesday i'm going to show you how you can migrate back and forth between different custom post type plugins without having to do any migrations you just have to know the namings of the fields and and you could just move it over to a different system but we'll get to that on wednesday so make sure you come back for that so this is what we're doing today we're going to be taking a look at utilizing pods 2.8 not the current version you've got to use the beta version and you'll see why and in fact we might periodically switch back and forth between the current released version of pods and the beta release so you can see the difference uh for those questions that are uh coming in yes this is going to be recorded so if you do have to jump off and go anywhere these free webinars not only are going to be recorded but they'll be part of the youtube the the wp studio youtube channel so you can go back and watch them whenever you want you won't have to become a member of wp studio or anything like that all right so here's what we're going to do we are going to start with pods because pods is one of those revolutionary tools that came about a long time ago and has been completely free since day one now why are you or some of you may be hearing about pods for the first time well part of the reason why you're hearing about pods for the first time is uh oh and bear with me one second every once in a while um there's a comment assistant that works on this broadcast thing that if it really likes one of your comments it's going to put it up on the screen so rick i don't know if you meant to put that up on the screen but the the comment assistant really liked that all right so we are starting with pods because it has been around for over 10 years now let me give you just a little background about why things like pods and metabox are so important wordpress again this if you've never been on a training webinar by me you will get used to a term called the rabbit trail i fall down rabbit trails a lot because there's just some interesting things that would be great to communicate so in the history of wordpress and where it came from when we first started the only thing that exist in wordpress was po what was actually um pages uh sorry was the posts the first version of a wordpress which is forked from the b2 blogging engine we only had post in fact we didn't even have categories and tags at the beginning and so because it all started with posts it became a big deal when all of a sudden we got pages now there were two different type of custom post types and all of a sudden wordpress became not just a blogging engine a blogging piece of software but we could start as developers and designers of websites we could start building unique situations and felix i will talk about oxygen and other alternative integrations on wednesday kind of when we take a look at some more advanced functionality stuff but yes there's a way you can absolutely do what we're going to do today with oxygen as well as other themes that don't use traditional templating systems and there's multiple ways of doing it all right so for those of you who may have been developing with wordpress for many years and you've been doing client work one of the things that we experienced was we had to educate clients on if we were making them a custom like a newspaper website hey when you are creating a blog post and you're coming in here and you're editing something and you need to learn how to use the categories you need to learn how to use the tags so that we can uh handle our tags and we can handle and kind of sort out through a query where the tags go where the categories go that that's that's not how a good content management system works we needed a way to easily extend wordpress by offering different types of custom post types whether if i'm going to create a recipe site i should be able to create a recipe custom post type and not shoehorn it into a page or a post and then tell the client hey anytime you do a recipe you need to check the box on the category recipe in order for us to render it onto the theme in a different way those are all different things to to think about well if you ever work with drupal the drupal content management system at the beginning stages of drupal they allowed you to create and declare different post types that's something that wordpress didn't offer well that's where pods came in pods provided the option of adding new post types taxonomies custom settings pages as well as extending things that currently existed in wordpress like extending the what posts have like adding additional fields so it's not just the title the content the featured image we could add more stuff and so it got its it's kind of uh inspiration from how drupal did things and pods was there and after pods there was a whole bunch of other custom post type creators uh things that would allow you to extend but none of them added extra fields and none of them added templating on top of it so i'm going to take literally two minutes to show you from scratch how i can easily add a custom post type using pods and this is specifically a little section for those of you who have never done anything with pods so here we are brand new wordpress website i've installed pods i come here over here to my edit pods and i'm going to create a new pod what are we going to create a simple drop down gives us the option of are we going to create a post type so that's like a post or page are we going to create a taxonomy as a way that we could attach to a custom post type or are we going to do a settings page now on tuesday we're going to look at settings pages and other things so let's create a book and books so basically we're using our singular label and our plural label now before i go forward i do want to let you know you could do all of this in code in your function stop php or build yourself your own plugin you can do it all in code you just have to learn all the php hooks and functions that are used to create the custom post type or you can use a user interface like pods to create it for you all right next step well guess what look at this our custom post type is already created we did not have to do anything else in fact if i come over here and i can click add new we're gonna see hey look here we are we're in a custom post type for adding title and starting your information writing your content now if you were using the classic editor you'd get the traditional classic editor as well let me leave that page all right so we're back here but it doesn't stop here because if i were writing in code i'd have a long array of arguments that would set like different labels on my custom post type that would enable whether or not it's a hierarchical custom custom post type whether it has certain rewrites for the permalink all these type of things exist but i can do everything through simple settings here in pods in my label these are all the labels that would exist and be used throughout the admin section of wordpress so for example if we see new book where would that show up or add new book well part of that is here add new all books see i can see there's my all books now if i wanted to not say all books and say check the library and i hit save pod by simply changing that label and i come over here to um check the library see i'm able to provide a customization for my clients that is second to none i can go as deep as i want for client websites or my own personal sites that i build and you can do all of that in this label section in the admin ui we can go through and provide a little post type description this is not used as much unless the theme a theme can go in their query and pull that type of stuff out uh that's not as important if i show admin ui i can turn that on and off basically the admin ui would be seeing the books all this type of stuff i can show admin menu in dashboard or turn it off i can show it in the navigation menus and turn it off and show in admin bar new menu now where are these because sometimes if you're not as familiar with wordpress just seeing these check boxes you don't know exactly where those are this show in admin bar new menu is right up here look at this i now have automatically been able to choose whether my new shows up for book in my navigation menus if i'm working in creating the menus i now have um i have to first create my first menu this is a brand new website if you're just joining us um okay so by doing this i can see look my books are an option that i can utilize in the menu so all that's easy in the the admin menu in the dashboard this is the admin menu on the left hand side so it shows up i have the ability to turn those on or off again it gives you great flexibility when creating a custom solution for a client again is it public is it public queryable meaning are we going to return search results using the wordpress search um come back for a future webinar where i'll talk you through how to improve wordpress search and how to use different plugins for search that's a future planned webinar so you definitely want to follow the the wp studio youtube channel or get involved with the newsletter over at wp studio to know about these upcoming trainings or you could exclude it from the search we can is it going to be hierarchy have hierarchy so we treating it like a page you know how pages can have parent pages and sub pages or child pages whereas posts are all like horizontal each post is at the same level in the hierarchy we can we can choose that um we can even come through here and say do we want to support traditional or the the standard wordpress settings well maybe we do want a featured image so we need to turn that on maybe i'm not going to use the regular editor because i'm going to add my own fields so i'm not going to use the content i'll leave the title and this uh featured image we'll turn off all the other things because i'm not going to deal with comments on this and and all these other things [Music] now rick you just popped in a question that i saw about tool set and jet engines those are other tools that really need you to stay within their ecosystem to to work um the reason why we are again focusing on pods and metabox is it doesn't matter what theme you use what tool you use you don't need compatibility issues they will simply work because it's wordpress um now i love tool set for those of you who know me from wp studio we've done a whole bunch of webinars on toolset as well i just tend to gravitate more towards these and you'll see why over the next few days all right the templating option will cover in a little bit and then the rest api is here now here's a little trick i know and i still know that the gutenberg block editor is popular with some people not very popular with other people sometimes the gutenberg block editor is not very friendly to new users where they would simply just like a area to write their content there is a very simple way of forcing gutenberg not to be used on your custom post type that you create with pods what is it if you just turn off rest api we save that let's go add a new book look we're back in the traditional wordpress now remember we took away the content and we'll add our own fields but that's one of those neat little tricks that i didn't even have to go tell it to turn off gutenberg i just turned off the rest api if i'm not using it for this post type we'll leave it on there for now all right so that's how i can create this but for our books i want to show you how easy it is to add new fields now the traditional way and i'm going to show you this so bear with me one second i'm going to save this pod and we're going to flip back to the old version or the current released version of pods so let me deactivate this version of pods and we'll activate the current release the 2.7 all right let's go back edit our books when i add a field all i can do is lump all those fields together i can write some function codes to sort them and bring them together and put them in different meta boxes but if i were to do something like author name oops name and then say hey i'm going to use a plain text field select that sure we're we're all set to go we've got our name field but what happens is under the current released version when i go add a new one we get a more fields box doesn't look great there's not a way to unless you're actually writing a filter and this is where you'd have to go into your functions.php write a filter to edit the title of this and then for us to group things together all right let's go back and i just wanted you to see if you hadn't seen the current version of pods we're going to deactivate and now activate the beta version if you missed the beta version go back and watch the beginning of this video all right so let's go back to our pods you'll see that the screen is slightly different we've got and it brought over the field that we created our name but let's start with creating our like editing our more fields so when we hover over this grouping so each one of these white boxes you are going to see that are clearly defined that has an add new group add new group down below this is a grouping so we can actually create multiple meta boxes that will show up and i'll show you that in just a moment so let me edit this so now i can do author information uh author how about i spell it correctly and i can say what is my metabox context normal side or advanced where this is the positioning and the priority is is what where we're putting something higher or lower we'll just leave everything normal right now again it's a grouped detail i don't need to do anything i don't need to restrict access to certain roles or capability but you could great thing is let's say you are building a site for a client and maybe you have an editor and you have a writer well the writer comes in and fills out the form and they hit submit but guess what when a writer submits it all it goes to is draft and then we then the editor who comes in we'll see some additional boxes we could put some extra fields in there for just the editor to fill out then they can submit and when an editor submits it publishes it so there's some really cool ways where a writer won't see these extra fields because we have restricted the access all right so let me save that group and immediately you see author information is here so we've got our author name let's go ahead and add a few more fields now this is the new look of pods 2.8 it is the ability for us to grab our labels we'll call this one our author photo and i'm going to come over here and say you know what what could we do let's go ahead and say let's a file image video now i can now come in here and say okay what options do we have is it a single file well what about if you want to like kind of a repeater or some people refer to them as clones i can have multiple files they can select as many as they want i can choose to use the regular wordpress media library or a php upload thing pl upload i can choose where am i going to put it attachment default tab do we automatic if you don't know this is when you go to upload something using the media library there are two tabs on that modal window one of them says upload file one of them is the media library let's say you're building a solution for a client or your own website that you already have tons of their pictures that they're going to use already in the media library so rather than them uploading you're wanting them to select things from the media library so you can basically force the default tab great little feature there is the title editable yes do you want to show the edit link so this is using the wordpress editor that allows people to crop images or not or resize or rotate you can choose to use that again we can choose to restrict it to specific extensions let's say you are only going to be doing um web p and png and jpeg you're not allowing anything else well you can set the file extensions that you and if somebody tries to upload something tries to upload a gif or something it's not going to work it's going to reject it so we can have all these we set our fields go into the advanced again with some default values we may get into some of this stuff on wednesday but this is more we do a lot of this training in wp studio so if that's something you're interested in stay tuned towards the end of this webinar and i'll tell you how you can take advantage of some of those so i'm going to save that field so now we've got a name and an author so if i were to save this pod right now and again we're just kind of skimming through this i'm going to add a new book you're going to see now we are left with our author information box so we can fill out the name of the author and we can upload or go to our media library or whatever we have for our photo all right let's go back here to our post our our pods because i wanted to show you that this is the new feature of pods 2.8 that's coming i can now add a new group let's call this one our book info i'm going to save this but guess what i am if i were to go over here basically my book title is going to be up here add title so i don't i want the author information after or maybe i want to put the author information over here on the sidebar and then have the book information right below it so let's do that so first i'm going to drag my book information up here i'm going to edit my author information and say hey you're going to we're going to put this on the side now in our book information let's add a field and let's call this one what shall we use just so you know all the things you could do you can use a plain text a website so this all our the website already has the the sanitation and the filtering to make sure that you're using and the validating that you're using an actual website url we've got our phone number an email a password you can do a plain paragraph text so that's like a select box uh in a traditional html form we use the the wordpress wysiwyg editor you can have a code editor that already has code syntax highlighting in there date time date time plane numbers currencies different uploads relationship fields these are backwards and forwards um we'll get into some advanced stuff tomorrow on that yes no's color pickers and then even just some layout stuff if i wanted to put additional instructions to the client on their custom post type so that they remember how to fill things out it's a perfect way to put this into your custom post type so we're going to go ahead here and i think i wanted to we'll just use this and we'll call this one book overview and we could put a few other fields like publish date so we're only really concerned about uh a year so i can come into this date go to my date options ah i have my predefined format what do i want to do i'm more concerned with just the years so i select how i format the date and by selecting this it's only going to do dates and so now i can also come in here and say i'm only concerned with 1962 [Music] 2025 save that field um i can come over here and add a one more we'll call this one our oh actually we don't we just this is a sample so let's just cancel this and save the pod so here's what we've done before we take a look back at this we now have two meta boxes with two fields in it in each and um yannick yes elementor can access pods fields uh we'll do that in some advanced functionalities both on tuesday and wednesday all right so let's let me just quick show you this add new so now not only is our author information now on the right side but my book info is in the proper location and again i have my date notice how none of these ones are selected i probably have to format this slightly better but you you can do a whole bunch of this stuff which is really weird why isn't that selecting i think i'm now into some really weird i probably shouldn't have clicked this so many times okay one of the other things you'll learn about wp studio training i will sometimes paint myself into a corner as i talk my way through how you're doing something it's perfectly understandable and hopefully how i get out of it helps all of you and also encourages you that if you get stuck in a certain thing or you expect the plugin to work in a certain way don't worry it doesn't always function how we think it's supposed to function it's like programming in python just because you have one plus one does not mean you're actually going to get the answer too literally okay so anytime that happens or i get too weird into a date publishing thing two things you can do just hit refresh so you go back to the traditional or whatever you have here then you can work on whatever you need to set it as or we can go back to pods and we can fix something all right so now that we've done this i'm about ready to show you the superpower of of uh of pods let's create a book in order for you to see the superpower we need to create two books big book actually if i spell correctly big book of awesomeness wow this is amazing and bob bobertson [Music] all right bob has just written a book great let's create a new book new book by bob this is the bob follow up expose [Music] whatever we need bob's name on there and it was published in 2021 as well all right let's publish it the reason why i'm doing this check the library here's my books great i don't need this draft let's trash that for now so here's the problem if i go take a look at the big book of awesomeness on my theme and again i'm using generatepress free plugin right now but basically any theme you use you will run into this exact issue where is the content where is the author name where is the date published oh are you telling me i have to go figure all that stuff out well pods makes it super easy so let's come back over here to our pods there was a one tab we didn't talk about and that's this auto templating option so pods has a really cool templating method where you don't have to know query or anything beyond some basic html and i'll show you why so we're going to come over here in the admin menu on the left hand side where it says pods template so let's create a pods template and let's do something i'm going to just move these around let's do something like a single single post for books so this would be how we would show our single post for books over here on the right hand side is a pods reference and i can select which pod i am wanting to use and what populates here are all the field names for everything that touches this post type so that could be the post information but maybe we have menu orders we have comment things we have authors we've got post date post modified all these different things that all affect these we can pull this stuff like a mail merge using pods magic tags into our template so for example if i create a little div and we'll do like class [Music] book [Music] we'll get our nice little formatting going i want to put a header and i want this post title i want the title of the book to show up first so pods uses the kind of squiggly brace and then the at sign will pull up a drop down basically this is a drop down of whatever we have set here so i can select the post title and it's going to fill it in we close it out and now we have our h2 tag [Music] all of a sudden let's go ahead and i'm again i'm doing something very simple here you can do something a lot more complex i need to get the book overview so i started typing bo and it gets to the book overview and so it's going to grab that book overview and then let's just below that we'll also do something like [Music] book written by and then we'll do a author name these were these extra fields that we added now i'm just going to publish this so we now have a template so let's now assign this template to be used for [Music] this post type edit pods go to books go to advanced templating options enable it and so now my singular template what do you want to use i want to use um oh did i not save that template i think i just literally did the thing okay look luckily it was still saved in my um cache let's update this so good so now our template is there saved let's go back over to our um edit post templating oh awesome okay here's why it's a beta version the drop down is broken it's okay i can figure it out without the drop down normally this will drop down and show you all the post templates so what we'll just do is we'll come over here and this is going to be the single post if i click on this you're going to actually see this is basically the name of the template and i hope this works because this would i wouldn't be able to show you single post let's see if this pulled it off there it is okay so it did work so basically i just took the title dropped it in here when they release 2.8 this will be a drop down currently in the current version of pods this is a drop down and it will show you and display all your post templates that you have there now you'll notice how all of a sudden i have two titles one that's basically being generated by the theme and one that's being generated by our our pods template where this is the content this is the book written by bob bobertson so here's our thing where are we putting the singular template right now it's set to be after so basically it just looks for the regular piece of content the regular custom post type and puts this after puts the template after if i were to put it if i were to put it before whoops hit it before you'll see that our stuff will show up before their stuff and basically the title of this book is also this is outside of the the loop on the single post that's why it's not showing anything different we're going to replace the content so when we replace the content on the single book all right so we're still running into a beta issue again why it's not released normally what would then happen is because we're replacing the content the the theme will no longer set its title no longer set its content it will just allow us to do what we want for this all right so i actually notice an issue if you ever see this where you all of a sudden have this index.php showing up it's because you haven't set the permalink um and we didn't set it because we got some weird thing going on there that happened at the beginning and i want to change the permalink this was a brand new site when we started today so that's why we never went in there and set the permalink that's going to adjust a few things so let me just go back over to our book and let's view that so there now we're on a book book of awesome now this is the other thing that happens when you're working with custom post types or any type of way of extending wordpress if you were to notice how what i did is i eliminated the the url of that specific post and i went back to the custom post type archive page that's how the permalinks are working basically you will you'll append the name of the post type to the end of your domain and you'll get an archive well that's most likely because we forgot to say that this was a uh this custom post type has an archive look enable archive page is not checked so we're going to check that save the pod then we come back over here and we test it and actually in order for us to do it properly because wordpress already knows it can't be found we need to go refresh the permalinks anytime you get that where you're changing things up something that has a heart archive or not simply go save the permalinks that flushes out all the url rewrites allows you to go again and so there we are now we're on the archive books look we have the same problem new book by bob big book of awesomeness that's part why with pods admin we can come in with our template and we can assign also our list template look here's why it's beta it's now showing up so i'm going to have to tell tell them that if they don't set the permalinks these don't show up once you set the permalinks they show up which is kind of weird so in this one i'm going to go ahead and replace as well we're just allowing that same template to be used on the archive and let's see if that we can just get it to insert in all right we're running into fun stuff so what would happen and i i probably should go back to the original version the current released version of pods it would replace that but the big change is the new fields so that's an interesting aspect of creating custom post types pods is a it's all in one you can create your templates assign them you can override anything else so just as an example of what we'll look at on wednesday i think uh for advanced functionality if you're using things like elementor pro beaver builder oxygen theme or other things one of the things as long as we know what the filter is that displays the content we don't have to mess with any code in the theme or in the functions because we simply use the hook name for where the the loop is the wordpress loop now one of the problems with using and only understanding wordpress in the world of page builders is you may not have the background to understand how templates and template hierarchy works which is part of the core of wordpress if that's where you are um a i'd encourage you to watch some of the our our webinars where we dive into core wordpress code so we can understand the un underlaying workings of how wordpress fetches things out of the query prepares it for a theme to display and render because if all you work in is page builders you may not realize there's a lot more stuff going on underneath and if you can understand that you can then tweak it and modify it and make it work for yourself so you're not reliant on other people's plugins to do queries for you or things like that all right that would i really didn't mean to spend 40 minutes 45 minutes on just pods um but i felt maybe getting a good reminder on what pods can do is helpful um i did not want to go longer than an hour so i'm gonna do a little speed run with metabox i'll talk you through it now metabox a number of years ago was basically just a code library that allowed you to build things but you had to dive into php arrays and queries well metabox now has like a builder system for creating your content the creating your structure and as a way of viewing things so i wanted a quick pull this off all right so let me move this so all i'm going to show you everything we just did with pods and again don't forget tomorrow and wednesday we will dive into the other things we can do with pods like settings pages extending regular wordpress all right so in meta box i am using the metabox all-in-one which basically just dumped all of their plugins onto one site and makes it easier to manage uh lorraine i just uh caught your question uh singular template option great question let me just quick jump back over here so i can explain it and in this over here in the advanced templating options you'll see a template location so basically this hook most most wordpress themes are going to use the content filter for the stuff that would appear in the content area the body of a wordpress post the content of the post and so it would write a filter and you could either before the filter occurs we would put our template or after the filter one of the ways people use this is if they really like their theme and how the theme formats but they want to get those additional fields that you create with pods they'll put it after and in their template they won't use like the title tag they won't use the the content box or anything else like that they will just put the extra fields listed below like if you were building a a car listing website or a house a real estate site maybe you just have tons and tons of fields that you're still going to use the regular post and content post title and content and you could put this after which would be a listing of all of the statistics or specifics about the house or you can simply replace the content that the is filtered so the location um and the list template location you can attach that custom post type ui and other plugins like that don't do don't offer so let's come over here and we'll create a movie movies movie i can go through the same thing edit the labels choose different types of advanced things now here's a neat little thing in pods i would have to go in and find the dash icon to give it something but here in meta box i can simply select something that looks like a movie great now we have we'll have a movie item i can come in here say is this uh does it have a hierarchy is does it have an archive uh enable post type archives is already there i can come in and say is what are we supporting the traditional wordpress stuff and are we attaching any taxonomies let me publish this now this is something that sets metabox aside let's say you have a dev site where you are working on your clients but you want your client's site to be so pristine with as a little amount of plugins as possible because you firmly believe that code which is right which is true when executed properly is always going to be faster than sites with plugins well look at this so on my let's say this is my dev site i'm like all right i've got my little custom post type for movies i've done all my work give me the code okay so here's the code that you could simply just go drop this into a functions.php of your live site and all of a sudden your site will now have all of this custom post type for a movie that's it i can get my php code so i don't have to have metabox running on the site i basically it wrote the code necessary in standard wordpress code there's nothing specific about this code that is just metabox but a movie the same way we made additional fields we need to attach those some more fields well the way metabox works is post types are separate custom fields can be grouped together and i can attach different fields to different post types so i can come in here and say i want to make a movie group of fields movie fields so let's add a field what type of field do you want to use do i want to do things like file uploads some layout information what about if i want to pull things from wordpress a different post like give me a listing where people can select the post that it's going to affiliate with some html date time pickers google maps open street maps lots of stuff that happens here your regular basic field so i'm just use a text field and say director now you'll notice there are a lot of options here where i can sit here and say all right there's a lot of options what do i want to deal with again i do a lot of training on this and if you want to go deeper that's part of what the wp studio membership is all about so i can come in here and we can create let's we'll just do one more field here um and let's do something like a we'll just do another text field um length of movie and you're like oh a length of movie i don't really want a text field can we change that to like a number field sure change that to a number field so now it'll validate on numbers and maybe i need a description on uh do something like minutes so that i can remember that i'm just trying to get the minutes of this all right so i now got two fields but what do i do because this is a field group i want to attach this field group to what do i want to attach it to post type user settings comments settings page uh word uh gutenberg block or because i want post type i want to attach it to my movie custom post type let's publish this now again i'm trying to move through this fairly rapidly i've got my movie add new so disaster movie the world has ended and there are no more actors the world cheers all right now look my movie fields bob bobertson is our director and the length of the movie if i do 120 look at this i now have it's because it's a number field that understands what up and down is all right so we'll go ahead and publish this great i've got my idea let's go view this movie oh looks like um because i've got a brand new custom post type let's just go do our permalink setting thing settings permalinks i have some heavy caching on this server so that's also probably why we're also having issues let's go over here and view the movie all right disaster movie the world ending but where's the other stuff now with pods we attached a template to the same thing to the same post type metabox has this new thing called views it allows us and there's some really advanced things here we can call this one our single movie view same type of thing i can come in here and say [Music] we'll just do h2 well how do i get the movie title in the same way pods now this uses a twig twig markup language if you're familiar with twig it's a way to do basically html structure where we can ask if then statements we can do some additional conditional logic ideas but my button over here is insert field where now all the fields that exist in this wordpress website so i can pull up post title then do something like this movie is about the content oops i don't want it twice and then do something like and was directed by come over here director boom so now i can say i'm going to use it for the singular or the archive if you want to know more about all these other things which are really cool you definitely want to be part of the wp studio membership as i go dive deep into this but we're going to add a rule and say for my singulars for every movie singular one or i could just choose which posts get this special setting we're going to now use this as a way to display our content now i can choose to do only the post area the layout between the header and the footer i'll do all three of these just so you see what it does so let's go ahead and publish this so we now have a rule for where this is going to be used so let's go back over to our movie view and look because it um has some horrible formatting and i didn't do any html proper there's our stuff but it dumped everything in between the header and the footer because remember i can now just say hey i'm now going to rewrite this whole page and if i did some some good styling that's i now can output whatever i want and override the theme or i can come over here and say only the post content where we have the similar things the same thing that pods offers before it after it or replace the post content uh update this and now we are presented with our disaster movie in the proper theme format and was directed by bob robertson whatever again i'm just simply plopping these things out there for you so as a quick wrap up because i only have about two minutes or so left again trying to stay under the hour mark for each one of these training ideas tomorrow we are going to open the floodgates uh and go beyond just oh let's create a custom post type and let's add something we're going to take a look at settings pages we're going to dive into concepts of conditional logic so literally advanced conditional logic of let's uh choose a so you see here where's my advance a conditional logic of only if the director equals bob will we see this field length of movie if bob is not the answer to director we're not going to show this field so all of a sudden metabox opens the door to you to build advanced solutions for your clients or your own websites we can do some of that with pods but not to the level we can do it with metabox and then on wet specifically wednesday we will take a look at how these tools work with page builders how these works with other solutions but part of reason again why we looked at it advanced custom fields and other things requires you to use tools that have show the fields and or allow you to put those fields into a theme or a page builder both pods and view and metabox offers this powerful tool called the views so i hope you guys have enjoyed this kind of introduction to pods and meta box wp studio is going through a massive rebranding relaunching uh i've been teaching for 15 years about wordpress uh and all the things that we can do with it if you want to be up to date on what we are doing be alerted to upcoming free and premium trainings as well as membership information for now if you just want to sign up for the latest wordpress news by going over to wp studio that way you won't miss anything out or you can simply like and follow both the facebook channel or the youtube channel whichever one you guys came on and joined for again i hope you guys have a great rest of the day i do hope i'll see you back tomorrow at 2 p.m same time and we will get into some advanced stuff with uh wordpress and pods and meta box and if you have any questions or you want to cover certain things put it in the comments either on facebook or youtube i will look at them tonight and before the webinar tomorrow and if i can answer any of them during the live session tomorrow we will do that so i hope you guys have a great rest of the monday hope to see you guys tomorrow and check out wp studio there's not much if you're not a member if you are a member there's still a lot of stuff over there but if you're not a member really the only thing you can do is sign up for the email but more is coming so take care have a great rest of the day and i will see you all soon
Info
Channel: WPStudio
Views: 370
Rating: undefined out of 5
Keywords:
Id: VhUNDUtzc5Q
Channel Id: undefined
Length: 64min 55sec (3895 seconds)
Published: Tue Jun 29 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.