No Plugins Necessary / PHP / Plugins

Create Your Own Simple WordPress Plugin

php-plugin

Here I will explain how to create your own simple WordPress plugin to use on your WordPress site.

I don’t normally do this because I rarely ever update a theme after I install it on a site, I usually just enter any custom PHP code into my themes functions.php file.¬†But for those of you who do like to update your themes when new releases come out, here is an alternative method…

Create a simple plugin by creating a new PHP file in your plugins folder and give it the following header(Replacing “Example Plugin” with whatever you want to name your plugin)

1
<?php /* Plugin Name: Example Plugin */

Add whatever PHP code you want to add below the header and save the file. Now you can login to your WordPress and activate it like any other plugin.

Related Posts

Handy Code Snippets / How To / No Plugins Necessary / PHP

Handy WooCommerce Store PHP Snippets

woocommerce-codesnippets

Here are some Handy WooCommerce Store PHP Snippets that you might find useful... Auto-Complete All WooCommerce Orders [cc lang="php"]...

Handy Code Snippets / How To / PHP / Plugins

List More Custom Field Names

ListMoreCustomFieldNames

First install & activate the List More Custom Field Names plugin. Then add the following code to your functions.php or your cust...

3 Comments

  • Add a New Menu to your WordPress Theme – WordPress Site Handbook

    Jan 08, 2017

    Reply

    […] It is actually really easy to add a new menu to your WordPress theme. Just copy the following code snippet(replacing “New Menu” and “new-menu” with the name of your custom menu) into your themes functions.php file or create your own plugin using my guide on the subject. […]

  • List More Custom Field Names - WordPress Site Handbook

    Jan 15, 2017

    Reply

    […] First install & activate the List More Custom Field Names plugin. Then add the following code to your functions.php or your custom plugin file. […]

  • Create Your Own Simple WordPress Plugin | Bonkage.comBonkage.com

    Apr 02, 2017

    Reply

    […] post Create Your Own Simple WordPress Plugin appeared first on WordPress Site […]

Leave a Reply