Posts about using the open source CMS WordPress

Wordpress Category Post List

Thursday, June 24, 2010 - 18:25

A friend of mine asked me to write a Wordpress function the other day that printed out a list of categories and any posts in those categories, along with any meta data that might be in the post.

All the function does is to get a list of categories and then for each category get a list of the posts associated with that category. Not much really, but useful in some circumstances.


Wordpress 3.0 Released!

Friday, June 18, 2010 - 12:46

It's been a while in the making but yesterday saw the release of the latest major version of Wordpress. I had a feeling it would be pretty soon as there as the final release candidate (RC3) was released last week. You can the Wordpress 3.0 download page below:

Download Wordpress 3.0


Get Child Pages List In Wordpress

Monday, May 10, 2010 - 22:58

It is possible to print out a list of pages in Wordpress, but these functions are designed to print from the root pages to a certain level. I often need to print out a list of pages that are children of the current page being looked at so I created the following function.


Add Enctype To Wordpress Post And Page Forms

Saturday, March 27, 2010 - 22:25

Whilst creating a small plugin on a Wordpress site I decided not to use the media library as I just wanted to add some small stub images to the content. I created some boxes on the post page using add_meta_box() and added a file input box to them. The only thing is that the post form in Wordpress doesn't have the enctype="multipart/form-data" attribute and so it won't pass file to the $_FILES array in PHP.

It is not possible to add the enctype into the form declaration via Wordpress as there is no hook or action to do this. So the only alternative (rather than hack the source code) is to add the attribute using JavaScript, and as we have JQuery already loaded we can utilise that.


Wordpress Database Changes When Moving Site

Saturday, March 27, 2010 - 13:36

When moving a Wordpress install from one place to another there are a number of things you must be aware of. If you have created your templates properly you will have used calls to bloginfo('home') rather than using static links, but you will need to update these links to make your Wordpress install work properly.

Once the files are in place, the database connection details have been edited and the database created there are a number of things to alter in the database to make your Wordpress install work.