Register custom post type

July 3rd, 2020 / by kingjman09

#php #wordpress

If you are working on a client site and do not want to install another plugin, then you can manually create your custom post type by adding these codes in your theme’s functions.php file. This is just a quick and fully working example that registers a post type ‘testimonails’ with category and tag.

After setting this up, you should see the menu entry for the custom post type. You should be able to add posts, view the post list in the admin and also visit the published posts on the website.

As I mentioned this is just a place to have an easy access on my certain codes. I suggest looking at Register post type function from the wordpress codex for a full description.

If you have suggestions and corrections please feel free to drop it in the comments section.

Leave a Reply

Your email address will not be published. Required fields are marked *

sixteen + 6 =

close
Kingj Maningo blessed

Thanks for taking the time to reach out. How can I help you?