Category : code

Obviously..

I wanted something that would be better for showing pictures as well as text – seeing as that’s what I post mostly, these days. ¬†Opinions welcomed.

Just noticed that the new facebook commenting functionality has killed all the old comments. How bad is this? I am not sure.

OK, so you have a site. It’s not set up like a blog, so you don’t have a blog or posts page.

You notice that submitting the search form with nothing in it sends you to a broken home page.

There are all sorts of madnesses touted to fix this involving modifying the core wordpress code, which is a terrible idea given how often it updates.

stick this in your functions and ¬°presto pronto! all better. This will just send you to your search page and show everything with a space in it..

add_filter( 'request', 'my_request_filter' );
function my_request_filter( $query_vars ) {
if( isset( $_GET['s'] ) && empty( $_GET['s'] ) ) {
$query_vars['s'] = " ";
}
return $query_vars;
}