welcome to the code mental channel my name is Armindo and my channel is
all about learning software development and python
programming yet today i'm not going to be doing
python programming in fact i'm going to be doing some php
and i'll be working with wordpress so let's get started so we can see the
project here
so let's see
plugins right right now it's just i'm going to
maybe call it main.php [Music]
my performance
all right
so this url doesn't exist
okay so let's go into our wordpress
website
and let's see our magical plugin [Music]
okay i have it here [Music]
so i've created a plugin so far so easy activate done
so the reason i need the custom post type is because i need to create
uh one or like an infinite number of forms for the
website and i'm going to be using a short code
with an ide to basically refer to the form i want to use
the easiest and each form itself will have a list of fields that i'm going to
pre-select you know just say like i want name age
or whatever so i need to store the information in
the database and the easiest way to do that in wordpress is to use a custom
post the thing about wordpress is that it
uses posts the wp posts uh
there's a table called what we post and in wordpress it uses that for everything
and in fact you can do a lot of stuff in wordpress without having to create any
custom table whatsoever so what i'm actually going to
do is just use a create a new custom post type
and i'm going to use add some metadata which
will be information for each form about what fields are needed
so this document is included seems to be what i need
and the nice thing about creating a custom post type is i get an
administration menu straight away that's why it says here
so i'm really excited about it i think i'm on the right track
okay so i have to use this rush to post type
so let's copy and paste this [Music]
oops and i'm going to replace well i'm going to even leave
that here for now [Music]
so i'm actually
so post type in this case is going to be
i'm going to call it flexible forms in a singular
because that you know that's going to be the entity that's going to exist
the labels is going to be flexible form
i think it's the plural and the singular
and then public has archived
and i think i need to add this here [Music]
this is the function name
so i go [Music]
into my wordpress
this is totally refresh
wow flexible forms here we go