Plugin Folder Setup

Are you prepared to begin creating your own WordPress plugin? You are at the right spot!

Discovering how to build a custom WordPress plugin gives you access to a completely new universe. It enables you to create unique functionality for yourself, your customers, and even the open-source community. We’ll take you from scratch to having a fully working plugin that can be added to the WordPress.org plugin directory in this tutorial. You’ll need a fundamental grasp of HTML, CSS, PHP, and WordPress functionality to follow along.

Step #1: To keep your plugin files, create a directory

  • Index.php
  • customform.php

Custom Form is our plugin name or folder name as well, that’s why we create foldername.php file as customform.php file.

Header Comment

The header comment is the most important step in any plugin development. As you know we add a bunch of code in the stylel.css file in the WordPress custom theme development course. This header comment does the same thing, it helps WordPress to identify our plugin and we add some meta information there too.

/*
 * Plugin Name:       Custom Form
 * Plugin URI:        https://codestuffing.com/plugin-development/
 * Description:       This is form plugin, we create it on our plugin development course at codestuffing.com
 * Version:           1.0
 * Author:            Hussam HM
 * Author URI:        https://codestuffing.com/author
 * Text Domain:       customform
 */

 

When you will add the above code and you will visit Dashboard -> Plugins, You will see our plugin will over there.

Custom Form Plugin

Our plugin is now on the admin plugin page, after that we will add some “Basic Security” stuff in the main file foldername.php.

if(!defined('ABSPATH')){
    exit;
}

 

#BeingCodeStuffer

Related Plugin Developments