how to create a wordpress plugin code example

Example 1: wordpress plugin development

wordpress plugin file

/**
 * Plugin Name
 *
 * @package           PluginPackage
 * @author            Your Name
 * @copyright         2019 Your Name or Company Name
 * @license           GPL-2.0-or-later
 *
 * @wordpress-plugin
 * Plugin Name:       Plugin Name
 * Plugin URI:        https://example.com/plugin-name
 * Description:       Description of the plugin.
 * Version:           1.0.0
 * Requires at least: 5.2
 * Requires PHP:      7.2
 * Author:            Your Name
 * Author URI:        https://example.com
 * Text Domain:       plugin-slug
 * License:           GPL v2 or later
 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
 */

Example 2: create a plugin demo wordpress

Login to your WordPress multisite network admin.
Head to Plugins -> Add New.
Enter Easy Plugin Demo into the search field.
Click to install the plugin.
Network Activate the plugin.
Go to Settings -> Easy Plugin Demo to set your preferences.

Example 3: wordpress plugin development

<?php
/**
 * Plugin Name: YOUR PLUGIN NAME
 */

Tags:

Php Example