Widgetise Your Theme Part II

Last week I wrote about how to widgetise your theme, and explained how to turn your sidebar into a dynamic sidebar, allowing you to add widgets from within your admin panel, rather than manually coding them into the sidebar. We can now take this one step further and create multiple sidebars/widget ‘blocks’. These don’t have to always be a full length sidebar, they could be two or three sections in the …

Sarah Written by Sarah from Stuff By Sarah
Posted on May 14th, 2009 and filed under WordPress Coding & Design
Do not forget to subscribe to our RSS feed for updates

Widgetise Your Theme

If you want to use widgets in your WordPress theme, or you’re a theme developer and want to make your theme ‘widget ready’, then all it takes is a couple of steps to add the necessary code in and your theme is good to go.

The Function

First we need to register the sidebar in our functions.php file (if you don’t have a functions.php file, create one). At the simplest form this is

[sourcecode language="php"]if …

Sarah Written by Sarah from Stuff By Sarah
Posted on May 7th, 2009 and filed under WordPress Coding & Design
Do not forget to subscribe to our RSS feed for updates

Creating Theme Options

If you create WordPress themes then a useful addition to a standard theme is to give the user a simple way to change the logo or header in use, perhaps allow them to change the colour of the background, the width of the site too. These options are designed to save people time but more importantly, to make it easy for non-developers to make a few alterations to their theme without needing …

Sarah Written by Sarah from Stuff By Sarah
Posted on April 30th, 2009 and filed under WordPress Coding & Design
Do not forget to subscribe to our RSS feed for updates

Plugin Administration Menus

When creating your own plugins you’ll often want to add one or more admin pages to allow users to configure options and add content, depending on what your plugin does. A couple of weeks ago I explained how to add an Options Page, this week I’ll run through how to add pages to other sections.

Creating a Submenu Page

The syntax of using these predefined functions is the same as using the options …

Sarah Written by Sarah from Stuff By Sarah
Posted on April 5th, 2009 and filed under WordPress Coding & Design
Do not forget to subscribe to our RSS feed for updates

Creating a WordPress Plugin III

This is the final part on the subject of creating a WordPress plugin (read part 1 and part 2). We’ll be modifying our original function, that outputs social bookmark links after each post, so that it works with our new options page.

So first we need to modify our display function. At present it just echos out the markup, however we need it to do the following

Put the markup into a …

Sarah Written by Sarah from Stuff By Sarah
Posted on March 29th, 2009 and filed under WordPress Coding & Design
Do not forget to subscribe to our RSS feed for updates

Creating a WordPress Plugin II

Last week I explained how to take a function and turn it into a plugin for your WordPress site. The plugin was fairly basic, just a function that created a list of social bookmarks. To use it you would just make a call to the function within your template file. However, we can go one better and give the user an option of either controlling where the bookmarks are displayed (as …

Sarah Written by Sarah from Stuff By Sarah
Posted on March 22nd, 2009 and filed under WordPress Coding & Design
Do not forget to subscribe to our RSS feed for updates

Creating a WordPress Plugin

Over the past couple of months we’ve started to look at creating functions and using actions and filters in our functions.php theme file to help manipulate the content output by WordPress. If you create something and feel it’s worthy of releasing for others to use then rather than just posting the code up for others to copy, it’s usually better to write a plugin.

To start a plugin file off you use a …

Sarah Written by Sarah from Stuff By Sarah
Posted on March 15th, 2009 and filed under WordPress Coding & Design
Do not forget to subscribe to our RSS feed for updates
Page 2 of 11« 1 2 3 4 5 6 7 » ... Last
Subscribe To BloggingTips Via RSS Subscribe To Blogging Tips Via Email Follow Us On Twitter Follow us on Facebook Find Out More About Our Newsletter

Sponsors

Blogging Tips Newsletter

Webmaster Corner

 

Our Free E-Books

Site Partners