Blog

Password protecting the wp-admin directory

2010-06-14

Several places recommend to block the WordPress admin area with a password. While this certainly is a good idea, implementing it properly is non-trivial. One of the problems is that the WordPress Ajax handler script is located in the admin directory. So password-protecting the admin area will break all Ajax … more

How to add support for navigation menus to your WordPress theme

2010-06-08

The new navigation menus system in WordPress 3.0 looks promising, but in my opinion it's not very usable yet. Anyway, here's one way to add navigation menus to your theme while maintaining backward compatibility: In your theme's functions.php add something like the following code: <?php function mytheme_addmenus() { register_nav_menus( array( … more

WPMU fast backend switch

2010-06-07

I recently converted several simple WordPress installs into a single WPMU install. As I use all of the blogs myself I wanted a quick way to switch between the various backends. This is probably only useful if you don't have too many blogs and use all of them yourself. The … more

WordPress 3.0 network lighttpd rewrite rules

2010-06-06

I recently installed my first WordPress network on lighttpd and was looking for rewrite rules. This post is correct except for the rewrite rule for files. I supposed it's a change that was introduced in 3.0, or maybe earlier. Anyway, here are updated rewrite rules: In your lighttpd.conf: $HTTP["host"] =~ … more

Nesting WordPress loops

2010-05-30

Sometimes it's useful to put a WordPress loop inside another loop. To do this you'll have to create a new WP_Query object, as in this example: <?php $my_query = new WP_Query( "cat=3" ); if ( $my_query->have_posts() ) { while ( $my_query->have_posts() ) { $my_query->the_post(); the_content(); } } $GLOBALS['post'] = $GLOBALS['wp_query']->post; … more

Visitor Movies for WordPress

2010-05-21

Did you ever want to know what exactly your visitors are doing on your site? Watch them! A client of mine wanted a plugin to log what users type into forms. I kind of didn't see the point at first. But a few days later I was a little annoyed … more

Convert WordPress pages to posts

2010-05-20

I like WordPress, but I don't like the WordPress page system at all. That's why I recently converted all my plugin pages to posts. My main reasons for doing so were: Pages can't be tagged Pages don't have categories Pages and posts don't mix too well in custom loops Pages … more

Get WordPress comments outside of WordPress

2010-04-14

Update: Apparently this code is also necessary when you want to list the comments on the blog page, and probably on archive pages as well. There could be a better solution, if you really care check out the P2 theme (and leave a comment). Sometimes you want to access WordPress … more

Custom Avatars For Comments

2010-03-31

Custom Avatars For Comments This plugin was initially written for a client and he agreed to open-source it. Thanks, John! Your visitors will be able to choose from the avatars you upload to your website for each and every comment they make. This can make leaving a comment on your blog more fun and … more

My plugins featured in Web Designer Magazine

2010-01-03

Web Designer Magazine In issue 164 of Web Designer Magazine by Imagine publishing there is a feature article on WordPress plug-ins: Electrify Your Blog: The Top 20 WordPress Plug-ins for the Next-gen Blogger. I'm very happy to see that they listed two of my plugins in it. The first plugin mentioned is my … more

DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confusedMoneyHackerUpset confusedX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerNginxSilenceTorWorldInternet securityFont