{"id":2644,"date":"2026-10-01T17:13:27","date_gmt":"2026-10-01T11:43:27","guid":{"rendered":"https:\/\/ehostpiya.in\/blog\/?p=2644"},"modified":"2026-10-01T17:13:30","modified_gmt":"2026-10-01T11:43:30","slug":"how-to-create-a-custom-wordpress-plugin-a-complete-guide","status":"publish","type":"post","link":"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/","title":{"rendered":"How to Create a Custom WordPress Plugin: A Complete Guide"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_88 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#How_to_Create_a_Custom_WordPress_Plugin_A_Complete_Guide\" >How to Create a Custom WordPress Plugin: A Complete Guide<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#What_Is_a_WordPress_Plugin\" >What Is a WordPress Plugin?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Why_Create_a_Custom_WordPress_Plugin\" >Why Create a Custom WordPress Plugin?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Common_reasons_include\" >Common reasons include:<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#What_You_Need\" >What You Need<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_1_Create_the_Plugin_Directory\" >Step 1: Create the Plugin Directory<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_2_Create_the_Main_Plugin_File\" >Step 2: Create the Main Plugin File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_3_Add_Your_First_Function\" >Step 3: Add Your First Function<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_4_Create_a_Custom_Shortcode\" >Step 4: Create a Custom Shortcode<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_5_Activate_the_Plugin\" >Step 5: Activate the Plugin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Complete_Basic_Plugin_Example\" >Complete Basic Plugin Example<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_6_Add_an_Admin_Notice\" >Step 6: Add an Admin Notice<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Understanding_WordPress_Hooks\" >Understanding WordPress Hooks<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Actions\" >Actions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Filters\" >Filters<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_7_Create_a_Custom_Post_Type\" >Step 7: Create a Custom Post Type<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_8_Organize_a_Larger_Plugin\" >Step 8: Organize a Larger Plugin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_9_Add_CSS_to_Your_Plugin\" >Step 9: Add CSS to Your Plugin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_10_Add_JavaScript\" >Step 10: Add JavaScript<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_11_Add_Plugin_Settings\" >Step 11: Add Plugin Settings<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_12_Sanitize_User_Input\" >Step 12: Sanitize User Input<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_13_Escape_Output\" >Step 13: Escape Output<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_14_Use_Nonces_for_Forms\" >Step 14: Use Nonces for Forms<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_15_Prevent_Direct_File_Access\" >Step 15: Prevent Direct File Access<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_16_Create_an_Uninstall_Process\" >Step 16: Create an Uninstall Process<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Step_17_Test_Your_Plugin\" >Step 17: Test Your Plugin<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Common_WordPress_Plugin_Mistakes\" >Common WordPress Plugin Mistakes<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#1_Using_Generic_Function_Names\" >1. Using Generic Function Names<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-29\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#2_Editing_WordPress_Core\" >2. Editing WordPress Core<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-30\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#3_Putting_Everything_in_One_File\" >3. Putting Everything in One File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-31\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#4_Not_Validating_User_Input\" >4. Not Validating User Input<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-32\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#5_Forgetting_Permission_Checks\" >5. Forgetting Permission Checks<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-33\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#6_Not_Escaping_Output\" >6. Not Escaping Output<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-34\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#7_Ignoring_PHP_Compatibility\" >7. Ignoring PHP Compatibility<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-35\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Custom_Plugin_vs_Child_Theme\" >Custom Plugin vs Child Theme<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-36\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Example_A_Better_Basic_Plugin_Structure\" >Example: A Better Basic Plugin Structure<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-37\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Best_Practices_for_Custom_WordPress_Plugins\" >Best Practices for Custom WordPress Plugins<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-38\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#Final_Thoughts\" >Final Thoughts<\/a><\/li><\/ul><\/nav><\/div>\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Create_a_Custom_WordPress_Plugin_A_Complete_Guide\"><\/span>How to Create a Custom WordPress Plugin: A Complete Guide<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress plugins make it possible to add new functionality to a website without modifying WordPress core files. While thousands of ready-made plugins are available, there are situations where creating your own lightweight plugin is a better solution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A custom plugin can contain anything from a simple shortcode to advanced integrations, custom admin features, API connections, or automation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide explains how to create a basic WordPress plugin from scratch and gradually expand it with practical examples.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Is_a_WordPress_Plugin\"><\/span>What Is a WordPress Plugin?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A WordPress plugin is a collection of PHP files and other resources that extends WordPress functionality.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Plugins can be used to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add custom features<\/li>\n\n\n\n<li>Create shortcodes<\/li>\n\n\n\n<li>Add custom post types<\/li>\n\n\n\n<li>Modify WordPress behavior<\/li>\n\n\n\n<li>Add dashboard functionality<\/li>\n\n\n\n<li>Create custom REST API endpoints<\/li>\n\n\n\n<li>Integrate external services<\/li>\n\n\n\n<li>Add custom widgets<\/li>\n\n\n\n<li>Automate website tasks<\/li>\n\n\n\n<li>Connect WordPress with third-party applications<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">One major advantage of plugins is that their functionality can remain available even when you change your WordPress theme.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Create_a_Custom_WordPress_Plugin\"><\/span>Why Create a Custom WordPress Plugin?<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Creating your own plugin can be useful when existing plugins don&#8217;t provide exactly what your website needs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Common_reasons_include\"><\/span>Common reasons include:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You need a small custom feature.<\/li>\n\n\n\n<li>You want to avoid installing a large plugin for one simple task.<\/li>\n\n\n\n<li>You need functionality specific to your business.<\/li>\n\n\n\n<li>You want full control over the source code.<\/li>\n\n\n\n<li>You want functionality independent of your theme.<\/li>\n\n\n\n<li>You need a custom API or third-party integration.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For example, instead of adding custom functionality to a theme&#8217;s <code>functions.php<\/code>, you could create a plugin:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>my-custom-plugin<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This keeps the functionality separate from the theme.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_You_Need\"><\/span>What You Need<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before creating a plugin, you should have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A WordPress installation<\/li>\n\n\n\n<li>Access to your website files<\/li>\n\n\n\n<li>Basic PHP knowledge<\/li>\n\n\n\n<li>Basic understanding of WordPress hooks<\/li>\n\n\n\n<li>A text or code editor<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You can manage files through:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hosting File Manager<\/li>\n\n\n\n<li>SFTP<\/li>\n\n\n\n<li>FTP<\/li>\n\n\n\n<li>Local WordPress development environment<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Always create a backup before modifying production files.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_1_Create_the_Plugin_Directory\"><\/span>Step 1: Create the Plugin Directory<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress plugins are stored in:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp-content\/plugins\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a new directory inside this folder.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp-content\/plugins\/my-custom-plugin\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The directory name should be simple and descriptive.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this example, we&#8217;ll use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>my-custom-plugin<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Your structure will initially look like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp-content\/\n\u2514\u2500\u2500 plugins\/\n    \u2514\u2500\u2500 my-custom-plugin\/<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_2_Create_the_Main_Plugin_File\"><\/span>Step 2: Create the Main Plugin File<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Inside the plugin directory, create:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>my-custom-plugin.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The structure becomes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>my-custom-plugin\/\n\u2514\u2500\u2500 my-custom-plugin.php<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open the PHP file and add a WordPress plugin header.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\/*\nPlugin Name: My Custom Plugin\nDescription: A simple custom WordPress plugin.\nVersion: 1.0.0\nAuthor: Your Name\n*\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The plugin header tells WordPress that this PHP file is a plugin.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_3_Add_Your_First_Function\"><\/span>Step 3: Add Your First Function<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Now add a simple function below the plugin header.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function my_custom_message() {\n    return 'Welcome to my website!';\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">At this point, the function exists, but WordPress doesn&#8217;t automatically display it anywhere.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We need to connect it to WordPress using a hook or shortcode.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_4_Create_a_Custom_Shortcode\"><\/span>Step 4: Create a Custom Shortcode<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">A shortcode allows you to insert custom functionality into WordPress content.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function my_custom_message() {\n    return 'Welcome to my website!';\n}\n\nadd_shortcode('custom_message', 'my_custom_message');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now you can use this shortcode inside a WordPress post or page:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;custom_message]<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress will replace the shortcode with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Welcome to my website!<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is one of the simplest examples of how a custom plugin can extend WordPress.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_5_Activate_the_Plugin\"><\/span>Step 5: Activate the Plugin<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">After uploading your plugin files, log in to the WordPress Dashboard.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Go to:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Plugins \u2192 Installed Plugins<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You should see:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>My Custom Plugin<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Activate<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Your plugin is now running.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Complete_Basic_Plugin_Example\"><\/span>Complete Basic Plugin Example<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Your plugin file can now contain:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\/*\nPlugin Name: My Custom Plugin\nDescription: A simple custom WordPress plugin.\nVersion: 1.0.0\nAuthor: Your Name\n*\/\n\nfunction my_custom_message() {\n    return 'Welcome to my website!';\n}\n\nadd_shortcode('custom_message', 'my_custom_message');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is a complete working WordPress plugin.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_6_Add_an_Admin_Notice\"><\/span>Step 6: Add an Admin Notice<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">You can also use your plugin to display a message inside the WordPress Dashboard.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function my_custom_admin_notice() {\n    echo '&lt;div class=\"notice notice-success\"&gt;&lt;p&gt;My custom plugin is active.&lt;\/p&gt;&lt;\/div&gt;';\n}\n\nadd_action('admin_notices', 'my_custom_admin_notice');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After activating the plugin, you should see the message in the WordPress administration area.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Understanding_WordPress_Hooks\"><\/span>Understanding WordPress Hooks<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Hooks are fundamental to WordPress plugin development.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are two main types:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Actions\"><\/span>Actions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Actions allow your plugin to execute code at specific points.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function my_custom_action() {\n    \/\/ Your code\n}\n\nadd_action('wp_footer', 'my_custom_action');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This tells WordPress to execute the function when the <code>wp_footer<\/code> action occurs.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Filters\"><\/span>Filters<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Filters allow you to modify existing data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function my_custom_title($title) {\n    return $title . ' | My Website';\n}\n\nadd_filter('the_title', 'my_custom_title');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The function receives the existing title, modifies it, and returns the result.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_7_Create_a_Custom_Post_Type\"><\/span>Step 7: Create a Custom Post Type<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">A plugin can also register custom post types.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, you could create a <strong>Services<\/strong> post type.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function my_register_services_post_type() {\n\n    register_post_type('services', array(\n        'labels' =&gt; array(\n            'name' =&gt; 'Services',\n            'singular_name' =&gt; 'Service'\n        ),\n        'public' =&gt; true,\n        'menu_icon' =&gt; 'dashicons-admin-tools',\n        'supports' =&gt; array(\n            'title',\n            'editor',\n            'thumbnail'\n        ),\n        'has_archive' =&gt; true,\n        'rewrite' =&gt; array(\n            'slug' =&gt; 'services'\n        )\n    ));\n\n}\n\nadd_action('init', 'my_register_services_post_type');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After activating the plugin, WordPress will provide a new <strong>Services<\/strong> section in the Dashboard.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_8_Organize_a_Larger_Plugin\"><\/span>Step 8: Organize a Larger Plugin<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">As your plugin grows, putting everything into one PHP file can become difficult to manage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A larger plugin might use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>my-custom-plugin\/\n\u2502\n\u251c\u2500\u2500 my-custom-plugin.php\n\u251c\u2500\u2500 includes\/\n\u2502   \u251c\u2500\u2500 functions.php\n\u2502   \u2514\u2500\u2500 admin.php\n\u2502\n\u251c\u2500\u2500 admin\/\n\u2502   \u251c\u2500\u2500 settings.php\n\u2502   \u2514\u2500\u2500 styles.css\n\u2502\n\u251c\u2500\u2500 public\/\n\u2502   \u251c\u2500\u2500 frontend.js\n\u2502   \u2514\u2500\u2500 frontend.css\n\u2502\n\u2514\u2500\u2500 assets\/\n    \u2514\u2500\u2500 images\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This structure separates different parts of the plugin and makes future development easier.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_9_Add_CSS_to_Your_Plugin\"><\/span>Step 9: Add CSS to Your Plugin<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If your plugin adds a frontend component, you may need custom CSS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public\/frontend.css<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then enqueue it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function my_plugin_enqueue_styles() {\n    wp_enqueue_style(\n        'my-plugin-style',\n        plugin_dir_url(__FILE__) . 'public\/frontend.css',\n        array(),\n        '1.0.0'\n    );\n}\n\nadd_action('wp_enqueue_scripts', 'my_plugin_enqueue_styles');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Using <code>wp_enqueue_style()<\/code> is preferable to inserting a <code>&lt;link&gt;<\/code> tag manually into your page.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_10_Add_JavaScript\"><\/span>Step 10: Add JavaScript<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">You can also add JavaScript functionality.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public\/frontend.js<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then enqueue it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function my_plugin_enqueue_scripts() {\n    wp_enqueue_script(\n        'my-plugin-script',\n        plugin_dir_url(__FILE__) . 'public\/frontend.js',\n        array(),\n        '1.0.0',\n        true\n    );\n}\n\nadd_action('wp_enqueue_scripts', 'my_plugin_enqueue_scripts');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This loads the JavaScript file through WordPress&#8217;s normal asset-management system.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_11_Add_Plugin_Settings\"><\/span>Step 11: Add Plugin Settings<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">More advanced plugins often need a settings page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, you could allow administrators to configure:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>API keys<\/li>\n\n\n\n<li>Company name<\/li>\n\n\n\n<li>Contact information<\/li>\n\n\n\n<li>Display options<\/li>\n\n\n\n<li>Feature toggles<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress provides the <strong>Settings API<\/strong> for creating administration settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A simple settings page might be registered using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function my_plugin_settings_page() {\n    add_options_page(\n        'My Plugin Settings',\n        'My Plugin',\n        'manage_options',\n        'my-plugin',\n        'my_plugin_settings_html'\n    );\n}\n\nadd_action('admin_menu', 'my_plugin_settings_page');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can then create the HTML output in a separate function.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For production plugins, use WordPress&#8217;s Settings API rather than manually processing arbitrary form submissions.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_12_Sanitize_User_Input\"><\/span>Step 12: Sanitize User Input<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If your plugin accepts information from users or administrators, don&#8217;t save raw input without processing it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$name = sanitize_text_field($_POST&#91;'name']);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Other WordPress functions include:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sanitize_email()\nsanitize_textarea_field()\nsanitize_key()\nabsint()<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The appropriate function depends on the type of data being handled.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_13_Escape_Output\"><\/span>Step 13: Escape Output<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Data should also be escaped when displayed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo esc_html($name);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For URLs:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo esc_url($url);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For HTML attributes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo esc_attr($value);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Input sanitization and output escaping serve different purposes and should both be considered when handling data.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_14_Use_Nonces_for_Forms\"><\/span>Step 14: Use Nonces for Forms<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If your plugin contains forms that perform actions, WordPress nonces can help protect against unauthorized requests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp_nonce_field('my_plugin_action', 'my_plugin_nonce');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When processing the request, verify the nonce:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if (\n    !isset($_POST&#91;'my_plugin_nonce']) ||\n    !wp_verify_nonce(\n        $_POST&#91;'my_plugin_nonce'],\n        'my_plugin_action'\n    )\n) {\n    return;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For administrative operations, also check that the current user has the required capability.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if (!current_user_can('manage_options')) {\n    return;\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_15_Prevent_Direct_File_Access\"><\/span>Step 15: Prevent Direct File Access<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">A common practice in WordPress plugins is to prevent direct access to PHP files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if (!defined('ABSPATH')) {\n    exit;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This prevents the file from being executed directly outside the WordPress environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\nif (!defined('ABSPATH')) {\n    exit;\n}\n\n\/*\nPlugin Name: My Custom Plugin\nDescription: A simple custom WordPress plugin.\nVersion: 1.0.0\n*\/<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_16_Create_an_Uninstall_Process\"><\/span>Step 16: Create an Uninstall Process<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">If your plugin stores data in the WordPress database, think about what should happen when the plugin is permanently removed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, a plugin might create:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Options<\/li>\n\n\n\n<li>Custom database tables<\/li>\n\n\n\n<li>Metadata<\/li>\n\n\n\n<li>Scheduled tasks<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You can create an uninstall process that removes data when appropriate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, don&#8217;t automatically delete user data simply because a plugin is deactivated. Deactivation and uninstallation are different events.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_17_Test_Your_Plugin\"><\/span>Step 17: Test Your Plugin<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Before using your plugin on a production website, test it carefully.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Plugin activation<\/li>\n\n\n\n<li>Plugin deactivation<\/li>\n\n\n\n<li>Frontend pages<\/li>\n\n\n\n<li>WordPress Dashboard<\/li>\n\n\n\n<li>Shortcodes<\/li>\n\n\n\n<li>Forms<\/li>\n\n\n\n<li>Database operations<\/li>\n\n\n\n<li>Different user roles<\/li>\n\n\n\n<li>Mobile layouts<\/li>\n\n\n\n<li>PHP errors<\/li>\n\n\n\n<li>WordPress updates<\/li>\n\n\n\n<li>Plugin conflicts<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If possible, test it on a staging website first.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Common_WordPress_Plugin_Mistakes\"><\/span>Common WordPress Plugin Mistakes<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Using_Generic_Function_Names\"><\/span>1. Using Generic Function Names<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function custom_function() {\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Another plugin might already use the same name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead, use a unique prefix:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function ehostpiya_custom_function() {\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A consistent prefix reduces naming conflicts.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Editing_WordPress_Core\"><\/span>2. Editing WordPress Core<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Don&#8217;t add custom functionality directly to WordPress core files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid modifying:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp-admin\/\nwp-includes\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or core PHP files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress updates can overwrite these modifications.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Putting_Everything_in_One_File\"><\/span>3. Putting Everything in One File<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A tiny plugin can use one file, but larger plugins should be divided into logical files and directories.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This makes maintenance easier.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Not_Validating_User_Input\"><\/span>4. Not Validating User Input<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Never blindly trust information submitted through forms, URLs, cookies, or other external sources.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Validate and sanitize data before processing or storing it.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Forgetting_Permission_Checks\"><\/span>5. Forgetting Permission Checks<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If a plugin performs administrative actions, verify that the current user has the necessary capability.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if (!current_user_can('manage_options')) {\n    return;\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Not_Escaping_Output\"><\/span>6. Not Escaping Output<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Always consider the appropriate escaping function when displaying dynamic information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo esc_html($message);<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"7_Ignoring_PHP_Compatibility\"><\/span>7. Ignoring PHP Compatibility<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Your plugin should be tested against the PHP versions supported by your target WordPress environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid relying on features unavailable in the minimum PHP version you intend to support.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Custom_Plugin_vs_Child_Theme\"><\/span>Custom Plugin vs Child Theme<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">A child theme and plugin serve different purposes.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Feature<\/th><th>Custom Plugin<\/th><th>Child Theme<\/th><\/tr><\/thead><tbody><tr><td>Website functionality<\/td><td>Excellent<\/td><td>Possible<\/td><\/tr><tr><td>Theme-specific styling<\/td><td>Possible<\/td><td>Excellent<\/td><\/tr><tr><td>Template overrides<\/td><td>Limited<\/td><td>Excellent<\/td><\/tr><tr><td>Survives theme changes<\/td><td>Yes<\/td><td>No<\/td><\/tr><tr><td>Custom shortcodes<\/td><td>Yes<\/td><td>Yes<\/td><\/tr><tr><td>Custom post types<\/td><td>Yes<\/td><td>Possible<\/td><\/tr><tr><td>API integrations<\/td><td>Yes<\/td><td>Possible<\/td><\/tr><tr><td>Custom PHP functions<\/td><td>Yes<\/td><td>Yes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A useful rule is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Use a child theme for theme-specific customization and a plugin for functionality that should remain independent of the theme.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example_A_Better_Basic_Plugin_Structure\"><\/span>Example: A Better Basic Plugin Structure<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">For a small but maintainable plugin:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>my-custom-plugin\/\n\u2502\n\u251c\u2500\u2500 my-custom-plugin.php\n\u251c\u2500\u2500 includes\/\n\u2502   \u2514\u2500\u2500 functions.php\n\u251c\u2500\u2500 admin\/\n\u2502   \u2514\u2500\u2500 settings.php\n\u2514\u2500\u2500 public\/\n    \u251c\u2500\u2500 css\/\n    \u2502   \u2514\u2500\u2500 style.css\n    \u2514\u2500\u2500 js\/\n        \u2514\u2500\u2500 script.js<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The main plugin file can load the required components.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\nif (!defined('ABSPATH')) {\n    exit;\n}\n\n\/*\nPlugin Name: My Custom Plugin\nDescription: Custom functionality for WordPress.\nVersion: 1.0.0\n*\/\n\nrequire_once plugin_dir_path(__FILE__) . 'includes\/functions.php';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This approach becomes much easier to maintain as the plugin grows.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Best_Practices_for_Custom_WordPress_Plugins\"><\/span>Best Practices for Custom WordPress Plugins<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Keep these practices in mind:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Use a unique plugin name and function prefix.<\/strong><\/li>\n\n\n\n<li><strong>Don&#8217;t modify WordPress core files.<\/strong><\/li>\n\n\n\n<li><strong>Use WordPress hooks whenever possible.<\/strong><\/li>\n\n\n\n<li><strong>Sanitize incoming data.<\/strong><\/li>\n\n\n\n<li><strong>Validate data before processing it.<\/strong><\/li>\n\n\n\n<li><strong>Escape dynamic output.<\/strong><\/li>\n\n\n\n<li><strong>Use nonces for relevant forms and requests.<\/strong><\/li>\n\n\n\n<li><strong>Check user capabilities before sensitive operations.<\/strong><\/li>\n\n\n\n<li><strong>Use WordPress APIs instead of reinventing existing functionality.<\/strong><\/li>\n\n\n\n<li><strong>Enqueue CSS and JavaScript properly.<\/strong><\/li>\n\n\n\n<li><strong>Keep the plugin modular as it grows.<\/strong><\/li>\n\n\n\n<li><strong>Document important functions.<\/strong><\/li>\n\n\n\n<li><strong>Test with different themes and plugins.<\/strong><\/li>\n\n\n\n<li><strong>Test on staging before production deployment.<\/strong><\/li>\n\n\n\n<li><strong>Keep dependencies and code updated.<\/strong><\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Final_Thoughts\"><\/span>Final Thoughts<span class=\"ez-toc-section-end\"><\/span><\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Creating a custom WordPress plugin doesn&#8217;t require a large codebase. A basic plugin can consist of a single PHP file containing a plugin header and a few functions. As your requirements grow, you can separate the code into modules, add administration pages, create custom post types, enqueue assets, interact with APIs, and build more advanced functionality.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The most important principle is to keep <strong>website functionality separate from WordPress core and, where appropriate, from the active theme<\/strong>. By using plugins, hooks, WordPress APIs, proper security practices, and a well-organized file structure, you can build custom functionality that is easier to maintain and upgrade over time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"How to Create a Custom WordPress Plugin: A Complete Guide WordPress plugins make it possible to add new&hellip;","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_display_header_overlay":false,"csco_singular_sidebar":"","csco_page_header_type":"","footnotes":""},"categories":[134],"tags":[],"class_list":["post-2644","post","type-post","status-publish","format-standard","category-wordpress-web-hosting","cs-entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Create a Custom WordPress Plugin: A Complete Guide - Web Hosting Blogs by Ehostpiya | Tips and Tricks<\/title>\n<meta name=\"description\" content=\"How to Create a Custom WordPress Plugin: A Complete Guide - Wordpress\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a Custom WordPress Plugin: A Complete Guide - Web Hosting Blogs by Ehostpiya | Tips and Tricks\" \/>\n<meta property=\"og:description\" content=\"How to Create a Custom WordPress Plugin: A Complete Guide - Wordpress\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting Blogs by Ehostpiya | Tips and Tricks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/ehostpiya\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-01T11:43:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-01T11:43:30+00:00\" \/>\n<meta name=\"author\" content=\"Vandeeta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vandeeta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\\\/\"},\"author\":{\"name\":\"Vandeeta\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#\\\/schema\\\/person\\\/7e99667266ef1b118ad734c1c035d796\"},\"headline\":\"How to Create a Custom WordPress Plugin: A Complete Guide\",\"datePublished\":\"2026-10-01T11:43:27+00:00\",\"dateModified\":\"2026-10-01T11:43:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\\\/\"},\"wordCount\":1591,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#organization\"},\"articleSection\":[\"Wordpress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\\\/\",\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\\\/\",\"name\":\"How to Create a Custom WordPress Plugin: A Complete Guide - Web Hosting Blogs by Ehostpiya | Tips and Tricks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#website\"},\"datePublished\":\"2026-10-01T11:43:27+00:00\",\"dateModified\":\"2026-10-01T11:43:30+00:00\",\"description\":\"How to Create a Custom WordPress Plugin: A Complete Guide - Wordpress\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create a Custom WordPress Plugin: A Complete Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/\",\"name\":\"Web Hosting Blogs by Ehostpiya | Tips and Tricks\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#organization\",\"name\":\"Web Hosting Blogs by Ehostpiya | Tips and Tricks\",\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/512.png\",\"contentUrl\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/512.png\",\"width\":512,\"height\":512,\"caption\":\"Web Hosting Blogs by Ehostpiya | Tips and Tricks\"},\"image\":{\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/facebook.com\\\/ehostpiya\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/#\\\/schema\\\/person\\\/7e99667266ef1b118ad734c1c035d796\",\"name\":\"Vandeeta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g\",\"caption\":\"Vandeeta\"},\"sameAs\":[\"https:\\\/\\\/ehostpiya.in\\\/blog\"],\"url\":\"https:\\\/\\\/ehostpiya.in\\\/blog\\\/author\\\/ehostpiya_blog\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create a Custom WordPress Plugin: A Complete Guide - Web Hosting Blogs by Ehostpiya | Tips and Tricks","description":"How to Create a Custom WordPress Plugin: A Complete Guide - Wordpress","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/","og_locale":"en_US","og_type":"article","og_title":"How to Create a Custom WordPress Plugin: A Complete Guide - Web Hosting Blogs by Ehostpiya | Tips and Tricks","og_description":"How to Create a Custom WordPress Plugin: A Complete Guide - Wordpress","og_url":"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/","og_site_name":"Web Hosting Blogs by Ehostpiya | Tips and Tricks","article_publisher":"https:\/\/facebook.com\/ehostpiya","article_published_time":"2026-10-01T11:43:27+00:00","article_modified_time":"2026-10-01T11:43:30+00:00","author":"Vandeeta","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Vandeeta","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#article","isPartOf":{"@id":"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/"},"author":{"name":"Vandeeta","@id":"https:\/\/ehostpiya.in\/blog\/#\/schema\/person\/7e99667266ef1b118ad734c1c035d796"},"headline":"How to Create a Custom WordPress Plugin: A Complete Guide","datePublished":"2026-10-01T11:43:27+00:00","dateModified":"2026-10-01T11:43:30+00:00","mainEntityOfPage":{"@id":"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/"},"wordCount":1591,"commentCount":0,"publisher":{"@id":"https:\/\/ehostpiya.in\/blog\/#organization"},"articleSection":["Wordpress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/","url":"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/","name":"How to Create a Custom WordPress Plugin: A Complete Guide - Web Hosting Blogs by Ehostpiya | Tips and Tricks","isPartOf":{"@id":"https:\/\/ehostpiya.in\/blog\/#website"},"datePublished":"2026-10-01T11:43:27+00:00","dateModified":"2026-10-01T11:43:30+00:00","description":"How to Create a Custom WordPress Plugin: A Complete Guide - Wordpress","breadcrumb":{"@id":"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ehostpiya.in\/blog\/how-to-create-a-custom-wordpress-plugin-a-complete-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ehostpiya.in\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Create a Custom WordPress Plugin: A Complete Guide"}]},{"@type":"WebSite","@id":"https:\/\/ehostpiya.in\/blog\/#website","url":"https:\/\/ehostpiya.in\/blog\/","name":"Web Hosting Blogs by Ehostpiya | Tips and Tricks","description":"","publisher":{"@id":"https:\/\/ehostpiya.in\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ehostpiya.in\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ehostpiya.in\/blog\/#organization","name":"Web Hosting Blogs by Ehostpiya | Tips and Tricks","url":"https:\/\/ehostpiya.in\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ehostpiya.in\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ehostpiya.in\/blog\/wp-content\/uploads\/2026\/08\/512.png","contentUrl":"https:\/\/ehostpiya.in\/blog\/wp-content\/uploads\/2026\/08\/512.png","width":512,"height":512,"caption":"Web Hosting Blogs by Ehostpiya | Tips and Tricks"},"image":{"@id":"https:\/\/ehostpiya.in\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/ehostpiya"]},{"@type":"Person","@id":"https:\/\/ehostpiya.in\/blog\/#\/schema\/person\/7e99667266ef1b118ad734c1c035d796","name":"Vandeeta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ee031298008d633e52bec71ce70d11a0b605dc666af42cdd52a950f061ad9f08?s=96&d=mm&r=g","caption":"Vandeeta"},"sameAs":["https:\/\/ehostpiya.in\/blog"],"url":"https:\/\/ehostpiya.in\/blog\/author\/ehostpiya_blog\/"}]}},"_links":{"self":[{"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/posts\/2644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/comments?post=2644"}],"version-history":[{"count":1,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/posts\/2644\/revisions"}],"predecessor-version":[{"id":2645,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/posts\/2644\/revisions\/2645"}],"wp:attachment":[{"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/media?parent=2644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/categories?post=2644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ehostpiya.in\/blog\/wp-json\/wp\/v2\/tags?post=2644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}