posts with the tag: filters

Posted by: bob on Wednesday March 23rd 2011 no comments
Tags: filters

I have made three observations on my own platforms related to the return of the admin bar in WordPress 3.1. First, it is annoying. Second, I have noticed a considerable slowdown in the page’s ability to render while it is being displayed, and oddly it seems to actually lag a bit in the processing too though I have no benchmarks to prove that. Third, I have noticed it breaking a lot of themes. Sometimes web development does not make sense and you just have to go with the answer “I hate it”, so here is how to get rid of that floating top admin bar on your theme.

Open up your theme’s functions.php file and drop this line in there. I added mine near the top.

PHP Code:
<?php

add_filter
('show_admin_bar','__return_false');

?>

Continue reading…

Posted by: bob on Monday March 21st 2011 no comments
Tags: filters, tags

I like all my categories to be structured pretty, and with nicely formatted words. I like my tags to be quick and all lowercase. After spending too much time fighting WordPress for duplicate slugs (e.g. multiple “PHP” categories and a “php” tag) I gave up on that. I decided to let WordPress have its category and tag both be the same “term”. The problem now is that all my tags looked nice except for a few, which were uppercased matching the category names they conflicted with.

After a little bit of filter debauchery, I crafted up this simple enough solution.

Continue reading…