Get Started With Wordpress Plugins
Jun 25th, 2011The purpose of this article is to get you started with Wordpress plugin.
-
Create a PHP file in
wp-content/plugins
with the name of the plugin, let’s sayqpleple-plugin.php
. Add some metadata and one first function:<?php /* Plugin Name: qpleple plugin */ function qpleple_page($page) { echo '<a href="http://qpleple.com/' . $page . '">' . $page . '</a>'; }
-
The plugin
qpleple-plugin
is now listed on the plugin page in the admin console. Activate it. -
You may now call all the functions of
qpleple-plugin.php
into your theme:You may want to read: <?php qpleple_page("get-started-with-wordpress-plugins") ?>
Going further
Of course, now you want to know more about it. I am kind enough to give you some leads:
- Writing a Plugin (wordpress.org) : official documentation
- Top 10 Most Common Coding Mistakes in WordPress Plugins (planetozh.com)
- Getting Started Writing WordPress Plugins (fuelyourcoding.com)