Plugins

How to Create a Description for a WordPress Plugin
How to Create a Description for a WordPress Plugin

To avoid duplicating the same plugin description code for the 150th time, I decided to do it once and fully describe it in this article. In all other articles — I’ll just refer to this one.

So, in order for WordPress to recognize which plugin is located in the «/wp-content/plugins/» directory and be able to install it, you need to declare it properly (more precisely — write a header). To do this, at the very beginning of the main plugin file, create the following comment (providing your plugin details, of course):

read more...

How to write a simple plugin for WordPress
How to write a simple plugin for WordPress

Hello! Although I don’t have much experience creating plugins, in this article I’d like to share an example of building a simple plugin that will:

  1. Store data in the database via the admin panel.
  2. Display that data on the front end for site visitors.

First — create a folder in /wp-content/plugins/ for the plugin. Let’s name it my-plugin.

Second — inside that folder, add a PHP file that handles the plugin logic. I usually name it the same as the folder — in this case, my-plugin.php.

read more...