Skip to content

CODING your own WordPress Plugins


Hi again and welcome!

I hope that you had finished our first project “CODING YOUR OWN WORDPRESS THEMES“, so if you don´t have any idea what I am talking about, please go to the previous link and code your own theme.

We´ll create a new plugin to make some custom post types. We´ll use the “Twenty-fifteen” WP theme with some dummy content (Theme Unit Test) just to show you how to, but you can put this Plugin in any theme.

Let´s create a post type forbook reviews- To do this we need a Plugin we can activate,so let’s do it.

First, we must create a new folder within our theme, in..yes, plugins folder with any name

Bear in mind that EVERY Plugin MUST have a UNIQUE folder name.

And within this folder, let’s create a new file called the same folder name dot php -> my_post_plugin.php

Ok,now add some header to our php file so WordPress actually shows it in Plugins and we can also activate it

*Plugin name: My Post Plugin
*Plugin URI: https:yourdomainnamehere
*Description: Add somee book reviews to this site
*Version: 1.0.0
*Author: Freelancerwriter
*Author URI: https://https:yourdomainnamehere
*License: GPL2

and now let´s check if WP shows it (the Plugin name will be theone I set in…yes,Plugin name, the highlighted line)

We can activate it, it will do nothing yet, but it works so far.

Let´s add some code to it; let´s make a Custom post type

Leave a Reply

Your email address will not be published.