Create plugin for wordpress ( introduction tutorial )

If there’s one cardinal rule in WordPress development, it’s this: Don’t touch WordPress core. This means that you don’t edit core WordPress files to add functionality to your site. This is because WordPress overwrites core files with each update. Any functionality you want to add or modify should be done using plugins.

custom-plugin.php

<?php

/*

Plugin Name: Custom Plugin
Plugin URI: https://abc.com
Description: This is a custom plugin for learning purpose
Author: Pankaj Kumar Loniya

*/

if(!defined('ABSPATH')){
header("location: /wordpress");
die();
}
echo "testing stringe";  // not write anything

?>
# http://localhost/wordpress/wp-content/plugins/my-custom-plugin/
# You will see all files and folder structure.
# create index.php file for escape this problem.

Leave a Reply