Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

develop basic plugin to help get me started WordPress

  • SOLVED

well, hello

I would you to help me out creating the first steps of a plugin with a widget, rather basic as I will add functionality myself - just need someone to get me started

When the widget is added to a page it will save a text string "test" to the post meta, from then on if the meta exists on the page it will display the meta ("test" in this case") in the contents. There should be a properties page under the settings menu which lists all the pages with this meta and the contents of it, with the option to delete it

- widget that saves some test text to a post meta if it does not already exist, if it exists show the text in the widget area and not try to save again

- options page that appears under settings
-- options page to list pages that have have this meta and the contents
-- option to delete post meta

Answers (2)

2011-11-06

Francisco Javier Carazo Gil answers:

<blockquote></blockquote>Well, I'll try to explain you all as brief as I can.

First, you'll need to create a file called: "myplugin.php" in /wp-content/plugins or a directory and a file inside it.

<strong>Header</strong>
In header of this file you will specify the general data of your plugin:


<?php
/*
Plugin Name:
Plugin URI:
Description:
Version:
Author:
Author URI:
License:
*/
?>


<strong>Post meta</strong>
To interact with post_meta you have this functions:
<em>add_post_meta()
delete_post_meta()
update_post_meta()
get_post_meta()</em>

You can see parameters in: [[LINK href="http://codex.wordpress.org/"]]http://codex.wordpress.org/[[/LINK]]

<strong>Widget</strong>
You'll need to create a function:

function widget_creator($args) {
extract($args);
echo $before_widget;
echo $before_title;?>Your widget ttile<?php echo $after_title;
// fill widget info
echo $after_widget;
}


<strong>Administration</strong>
[[LINK href="http://codex.wordpress.org/Adding_Administration_Menus"]]This part is long to explain. I recomend you to read this refer: http://codex.wordpress.org/Adding_Administration_Menus
[[/LINK]]
I hope it helps!


npeplow comments:

Hi Francisco

Thanks for the suggestions, I am really looking to get this delivered to me as a finished item I can just upload

2011-11-06

Luis Cordova answers:

hi npeplow

do this, and you will get your plugin almost ready, try searching on the plugin search section about a plugin with minimal functionality with a widget and related to doing saving the text and such, it will give you several plugins where to start modifications, you can even try them and see where they are at and decide where to start yourself and with which one.

That will give you a working piece of a startup, hope that helps