how to create custom plugin in wordpress from scratch


how to create custom plugin in wordpress from scratch

In this Post We Will Explain About is how to create custom plugin in wordpress from scratch With Example and Demo.Welcome on – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to how to create plugin in wordpress with example Example

In this post we will show you Best way to implement wordpress plugin tutorial for beginners, hear for create wordpress plugin from scratchwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

wordpress plugin development tutorial step by step

We learn to Custom plugin is used to all the core php customize the wordpress simple default implemantation both admin side and frontend side.

simple setp by setp WordPress provides more standard which some need to follow to make custom plugins.

There are the following list of the crate custom plugin in wordpress.

Step : 1 plugin header

Step 1. make a directory(folder) for custom new plugin under some plugins (folder)directory. make a php new file under the new (folder)directory and add the following script source code in it.

At first of all you need to simple custom define plugin header set as follows.

Plugin Name:Create WordPress Custom Plugin
Description:This is a custom plugin for learning step by step.
Author:Gondaliya Jaydeep


And then defining some header the first path plugin will be listed in simple admin panel under some plugins menu. we can here click to activate/deactivate/delete your plugin the plugin from here.

Step : 2 plugin activate/deactivate/delete

Step 2. Create some tables on table new or activation

register_activation_hook( __FILE__, array( 'CustomPlugin', 'install' ) );
global $wpdb;
$students = $wpdb->prefix . "Employee";
if($wpdb->get_var("show tables like '$students'") != $students) {
$sql = "CREATE TABLE " . $students . " (
id int NOT NULL,
lname varchar(255) NOT NULL,
fname varchar(255),
Address varchar(255),
salary_range int
//Basic path include
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');

Step : 3 create shortcode

Step 3.Define simple shortcode for plugin for frontend.

//simple exmaple below

//call a custom function 
function booking_template(){
include_once "booking-form.php";


I hope you have Got What is wordpress plugin tutorial for beginners And how it works.I would Like to have FeadBack From My Blog( readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article( Are Most Always Welcome.

Related FAQ

Here are some more FAQ related to this Article:

  1.   wordpress INSERT Multiple Rows using $wpdb
  2.   how to create custom WordPress Plugin from scratch
  3.   Create First WordPress Plugin Step by Step for Beginners
  4.   limit excerpt length in wordpress Example
  5.   Simple Create WordPress Plugin Tutorial
  6.   how to create custom plugin in wordpress from scratch
  7.   How to Create a Wordpress Plugin in 10 Minutes Flat
  8.   Fix 504 Gateway Timeout Nginx Error
  9.   PHP Set custom headers using cURL Example
  10.   how to create plugin in wordpress with example

Leave a Reply

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