Custom URL rewrites in WordPress – A Getting Started Guide

Hey everyone.
I’ve been tweeting quite a bit recently about custom URL rewrites in WordPress. After a few hours of trial and error, I’ve managed to get my specific custom URL rewrites working. After reading through several tutorials online (the majority of which used the same examples to explain only a portion the information I was looking for), here’s my tutorial- a getting started guide to Custom URL rewrites in WordPress.

The process

So, what exactly are we doing here? To put things in point form, this is the process:

  1. Create custom rewrite rules
  2. Add our new variables to the public_query_vars array
  3. Flush (and thus, regenerate) all WordPress rewrite rules
  4. Add our functions from steps 1, 2 and 3 into WordPress via actions and filters

Right, so lets get down to it then. Continue reading

WordPress theme features: What would you like to see?

I’ve been rolling the idea around in my head for a while now to create a WordPress theme, packed with all the features I find myself repeating on each project, as well as some new, useful features… and maybe a few whacky ones as well.

Yesterday, I jotted down a list of features I’d like to potentially include in this theme… some useful, some for repetitive tasks and some just weird and whacky. My question to you all is, what features would you like to see?

They can be any of the above- minimise repetitive tasks, new and useful or just plain weird and whacky. Lets have it guys. What features would you like to see in a WordPress theme?

Continue reading

Obox launches the Obox Theme Store

Well, guys, launch day is here. The Obox Theme Store is online! After weeks of watching Dave, Marc and Nat at Obox working late nights and early mornings, weekends, public holidays and all other kinds of days imaginable, the launch has happened, the first sale has come and gone and I must say, it’s looking AWESOME!

For those who haven’t been following the hype marketing campaign for Obox Themes over the past few weeks, Obox Themes is a premium WordPress theme store set up by the team at Obox Design, selling WordPress themes of a premium grade, with extensive additional functionality and keen attention to design detail. The Obox website has had an overhaul as well and now boasts an integrated theme store and support forums for customers.
Continue reading

A few guidelines for WordPress plugin development

The WordPress plugin API is vast and powerful. It allows developers to essentially hook code into almost any area of the WordPress system without modifying the core files at all. It also allows for the creation of standalone plugins that work within the WordPress system but do not hook into the core modules.

Over the last few weeks, WordPress plugin development has become one of my favourite things to do. I find it exciting to be able to create functionality, incorporate it seemlessly into the WordPress system and see it work smoothly with the other modules. While plugin development for WordPress is incredibly powerful, it also carries with it a few areas where people commonly stumble over and potentially lose interest in their code… which could be the next big thing. Here are a few guidelines I’ve picked up in order to step over the stumbling blocks.
Continue reading

My WordPress plugins toolbox

Hey everyone,
Just thought I’d post a list of my most regularly installed WordPress plugins and why they are installed on virtually every WordPress installation I do. If there are any plugins I haven’t listed that should be, please let me know in the comments. :)

1. Maintenance Mode

This plugin is truly awesome. It allows the developer and end-user to test the WordPress installation thoroughly, on the server where it will eventually be hosted, without displaying it to the world. It also allows the user to, as it says in the title, take the website down for maintenance at any stage and leave a message for users letting them know of the downtime.
Continue reading

Getting the information of a root page in WordPress

Often, when using WordPress as a content management or blogging tool on a website, one uses a multi-level page structure. This entails a page being listed “underneath” another page in a tree structure. Usually, if your WordPress installation’s permalinks deviate from the default setting, your page URL structure will look something like this:

http://websiteurl.com/parentpageslug/subpageslug (Note: note a real URL)

What if you require a value to be set depending on the highest level parent page? The process looks like this:

Continue reading

WordPress Shortcodes… in short

In the spirit of the topic, I’ll keep this post short and sweet. Today I’ll be discussing WordPress’s shortcode API and how to utilise it.

WordPress shortcodes are codes (eg: [list_bookmarks]) which can be typed into the content area of a page or post in order to provide functionality of some kind. Shortcodes can be wrapped around text (similarly to how HTML tags are wrapped around text) or can be used as a single tag. In this post, I will discuss using shortcodes as a single tag to save time as well as providing more control to the user of your WordPress theme/plugin/function.
Continue reading

Integrate tinyMCE into a WordPress widget

So, the native WordPress text widget is great, right? It allows users to insert virtually any form of content into a widget, provided they either want plain text or know a bit of HTML. The fact that this widget can be used in multiple instances is also awesome. Recently, I’ve needed to provide a bit more control though. Hence, my integration of tinyMCE.

Before I start, this tutorial assumes that you have a widget up and running (multi-instance or a conventional single instance widget) that has a text area which will be replaced with a tinyMCE editor. This tutorial is only about the integration. In my research on this topic, I came across a support query where a user was experiencing the same issue I was having: the content of the tinyMCE replaced text area was not saving. After a bit of testing, I found the solution.
Continue reading