How To Make Your Own WordPress Widget
Posted by AaronCampbell on November 9, 2009 · 9 Comments
In this article, I’m going to show you how to write a simple plugin that adds a new widget to WordPress. We’ll be using the new WP_Widget class, which is the newest method but means that the widget will only work in WordPress 2.8+. I know that 2.8 isn’t actually out yet, but it will be soon and there’s no sense in learning the old method.
The widget we’ll be creating will display upcoming posts (scheduled posts). A lot of sites schedule posts to automatically publish at a specific time, helping them keep a steady flow of articles. I know that I use this trick on Web Developer News and Attackr, and I’ll use it on this site as soon as I get some more articles written. Since the articles are already there and ready to be posted, why not tease them and give your readers something to look forward to? That’s exactly what this widget will do.
Filed under WordPress Widgets, wordpress development · Tagged with Wordpress, WordPress 2.8, wordpress development, WordPress Howto
Topics
- Acholi Beads (1)
- apache (1)
- BuddyPress (2)
- Community (1)
- CSS (1)
- General (4)
- JavaScript (4)
- News (1)
- Open Source (3)
- PHP (5)
- PrototypeJS (3)
- Script.aculo.us (1)
- Uncategorized (5)
- Web Design (11)
- Wordpress (14)
- wordpress development (4)
- WordPress News (7)
- WordPress Plugin Updates (11)
- WordPress Plugins (2)
- WordPress SEO (1)
- WordPress Themes (2)
- WordPress Widgets (2)
Recent Forum Posts
- Bad link when tweet from txt
posted in forum Twitter Widget Pro by AaronCampbell on March 15, 2010 at 2:03 pm
- Can I only show 5 tweets instead of 10?
posted in forum Twitter Widget Pro by AaronCampbell on March 15, 2010 at 2:00 pm
- Widget not appearing in sidebar
posted in forum Twitter Widget Pro by AaronCampbell on March 15, 2010 at 1:56 pm
- Documentation Assistance
posted in forum Google Maps by quepid@gmail.com on March 14, 2010 at 5:17 pm
- Timestamp less than a day shows "about -1 years ago"
posted in forum Twitter Widget Pro by jenne on March 14, 2010 at 3:31 pm
- Bad link when tweet from txt
Popular Tags
aaron apache BuddyPress business Community drupal eCommerce Efficient Related Posts free freelancing Free Template google analytics htaccess JavaScript jquery magento marketing Matt Mullenweg MovableType News Open Source PHP prototype radio redirect Related Posts shortcodes State of the Word template twitter Twitter Widget Pro Upcoming WordPress Release Web Design web developers WordCamp WordCamp SF 2009 Wordpress WordPress 2.8 WordPress 2.9 wordpress development WordPress News WordPress Plugins Wordpress Plugin Update WordPress Themes xavisys


