Archive: October, 2008

dotjay feeds fixed

I’ve been aware of a problem with my feeds for a little while. The main feed has been working okay, but some of the others I used to offer went a bit screwy. It should all be fixed again now.

You can subscribe to just my blog entries or to entries with a particular tag. So if you only want to be fed my accessibility posts, you can just subscribe to my accessibility feed. I’ve also included a new lab updates feed. Lab updates will also appear in the main feed. I’ve tried to redirect all previous feed URLs so that they will continue to work. My apologies if they break.

Test cases for tabindex bugs in Firefox

Added test cases for weird tabindex behaviour noticed in Firefox.

Trouble setting up a custom front page in WordPress 2.6?

I don’t know if this is a quirk of WordPress 2.6.2 or if something has changed in recent versions that aren’t reflected by the WordPress documentation, but I’ve had a hell of a time setting up a custom front page and shifting the blog index off to its own directory (like example.org/blog/). If anyone else is having a problem with 2.6.2 and custom front pages, this could help you…

In case it matters, I’ve got WordPress installed in its own directory and the site is using a custom theme.

To create a custom front page, you can use the is_front_page() conditional in the index.php theme file:

<?php
if ( is_front_page() ) :
?>
<h2>My front page</h2>
<?php
else:
?>
<h2>Other templates</h2>
<?php
endif;
?>

To create the blog index at /blog/, you need to create a dummy page called “blog”. You should be able to create a template for that page as the blog.php theme file. For some reason, my WordPress installation is not picking up the blog.php theme file, as it should according to the documentation. Without that file, it wasn’t falling back to index.php as I expected either. The latter observation I realised to be my own stupid fault as I had a page.php theme file that was being picked up by WordPress and used for my blog index. Still, blog.php should override the page.php file and it isn’t.

So, I’m currently using page.php for the blog index, detecting it using if_page('blog'):

<?php
if ( is_page('blog') ) :
?>
<h2>My blog index</h2>
<?php
else:
?>
<h2>Other page templates</h2>
<?php
endif;
?>

If you don’t have page.php in your theme, WordPress should fall back to using index.php. As mentioned above, you can detect the front page in there using is_front_page(), but you should also be able to detect the blog index in that file using is_page('blog').

<?php
if ( is_front_page() ) :
?>
<h2>My front page</h2>
<?php
elseif ( is_page('blog') ) :
?>
<h2>My blog index</h2>
<?php
else:
?>
<h2>Other templates</h2>
<?php
endif;
?>

I hope this helps someone else out there.

Embedded audio player added for audio clips

Audio clips now playable using the excellent XSPF music player.

PHPNW08 Conference

Just a quickie to say that my friends over at PHPWomen and GeekUp are helping to organise the PHPNW08 conference to be held in Manchester on November 22, 2008. There’s quite a lot of geek activity up north, and the conference aims to bring together the local PHP community for a ronkin’ good conference.

Looking at the schedule, there are going to be some interesting talks from some well-known PHP bods. The tickets are now on sale with early birds getting in for £50. Concession tickets are also available.

I’m not yet sure if I’m going to be able to go, but figured some of you lot might be interested. Let me know if you plan to go.