New Website Design

The recent release of WordPress 3.0 has prompted my to go for an overhaul of this site, making use of some of the jazzy new features in this latest version.

Custom Post Types

The introduction of custom post types is a feature that many WP users have been waiting for for a while, now it is here it is awesome. I’ve created a custom post type (‘papertoy’), and extended it with custom meta fields, to make managing my paper toys far easier than before. I may write a post with more detail on this some time.

Editable Menu

WP 3 allows menus to be managed in a wonderful interface in the admin console. Posts, pages, categories, etc, can all be dragged and dropped around to create a menu hierarchy. And it is incredibly easy to code in to a theme.

Widgets

Ok, these aren’t new. But as of WP2.8 there has been a new widgets API, which makes the creation of widgets a billion times easier than it was before. I’ve created two widgets for this new theme; one with links to my social network accounts, and another to display my latest paper toys.

The paper toys widget basically pulls an image (stored in a meta field) from each of my ‘papertoy’ posts and displays it with a link to the page itself.If you’re planning on doing something similar yourself, you may to check out this problem (and fix) when using the WP loop with the new widgets API.

The social networks widget is pretty simple, I may publish it in the future, but right now I’ve got other things going on. Oh, the icons I used are from here.

Read More
MSc Project-A-Go-Go!

I have decided, and agreed with my supervisor, what my MSc project is to be. I am most chuffed.

The title of the project is…

An Investigation in to the Relationship Between Lower and Higher Order Cellular Automata Problems when Solved with Evolutionary Search Heuristics

Basically I’m going to be looking at how search methods inspired by Evolution can be used to solve problems in Cellular Automata and how different solutions to similar problems are related (if at all).

(more…)

Read More
WordPress Loop in a Widget

When I was writing a WordPress widget plugin to display information from a sub set of my posts (that’s it on the side, with the paper toys…) I noticed that the WordPress Loop doesn’t quite behave itself when widgetized in the 2.8+ style.

When using the following code, inside a widget, to return posts from a custom query, you’ll find that the post title and perma-link are returned, but the post ID is not.

<?php $loop = new WP_Query($query);
while ( $loop->have_posts() ) : $loop->the_post(); ?>
	<a href="<?php the_permalink() ?>"><?php echo $post->ID.' : @; the_title(); ?></a>
<?php endwhile; ?>

Adding a global call to the $post variable at the top of the loop fixes this issue.

<?php $loop = new WP_Query($query);
while ( $loop->have_posts() ) : $loop->the_post();
	global $post;?>
	<a href="<?php the_permalink() ?>"><?php echo $post->ID.' : @; the_title(); ?></a>
<?php endwhile; ?>
Read More
Change is Coming… Syntax Highlighted Change

After the recent release of WordPress 3.0, I’ve decided to redesign my site taking in to account some of the fantastic new features it has to offer (more on that in a future post). But while I was hunting around for bits and bobs I found out about the marvellous syntax highlighter project, which allows me to do funky crap like this…

while read LINE; do
   echo $LINE
done < $0

Rather handily the highlighter script has been wrapped in to widget (several actually) for easily jamming in to WordPress.

Laters!

P.S. That script is my attempt at a Quine, a cheat I know, but it was the first code sample that jumped in to my head while I was writing.

Read More
Android Game: What the Hex?

Based on the interweb’s new favourite toy, Andy Yang’s What the Hex, I’ve created an android app that’s sort of the same thing really. Search for “what the hex” in the android market place.

Enjoy!

Read More