2009-08-28-WordPress-Widget-Development
-
Upload
lightspeed -
Category
Technology
-
view
588 -
download
0
description
Transcript of 2009-08-28-WordPress-Widget-Development
WordPress Widget Development
By Warwick Booth
Agenda
• Introduction• Background• Before you start• Basic Widgets• Widget Control• Functions.php • Wrap + Q&A
• Who am I• What we will be chatting
about• What are we trying to
achieve.
Introduction
Background
• Where to find info• Where I find help
Before you start
• Create your files• Set up frame work• Set up empty functions• Version Check
/*Plugin Name: WP-PageNaviPlugin URI: http://lesterchan.net/portfolio/programming/php/Description: Adds a more advanced paging navigation to your WordPress blog.Version: 2.40Author: Lester 'GaMerZ' ChanAuthor URI: http://lesterchan.net*/
Basic Widgets• Create a widget• Register a widget• Call the Widget
Widget Control
• HTML Formso $_Post Vars
• Saving Options• Displaying options
Functions.php
• Why functions.php• What to move• $Args • Global widgets for
BuddyPress
function list_authors_widget($args) {$targs = array( 'optioncount' => false, 'exclude_admin' => false, 'show_fullname' => false, 'hide_empty' => true, 'echo' => true, 'style' => 'list' ); ?><h2 class="widgettitle"><span class="" rel="29">Author List</span></h2><?php echo '<ul>';wp_list_authors( $targs ); echo '</ul>';}
Wrap up Q + A
• Basics of creating a widget• Global widgets for
BuddyPress