Tag archive for "development"

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

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

git is a powerful revision control system. It is a distributed system. This means that you can commit, create branches or tags on your local hard drive without any network connection. Read more about git on the project's website, there's also great documentation there. If you write WordPress plugins and … more

Not too long ago I wanted to add a new plugin to my blog. During various tests I noticed something quite shocking: at least one of the plugins insisted on loading it's CSS and jquery on every page of my blog. A little more testing showed me that many plugins … more

Recently, I've been checking out some of the blogs that link back to me because they use one of my plugins. And it seems like a lot of them are using buggy, incorrect templates. It looks like many WordPress theme developers don't read the theme development checklist. Another fine document … more

Now this was annoying. I tried a git clone ssh://user@my.host:/path/to/repository and it failed with Initialized empty Git repository in /current/path/repository/.git/ ssh: Could not resolve hostname my.host:: Name or service not known fatal: The remote end hung up unexpectedly The solution was rather easy, see man 1 git-clone. A valid git … more

Update: This post is ancient, with CSS3 and HTML5 there are much nicer ways to achieve similar things. When you use HTML forms it is often desirable to pre-fill some input fields. Your idea could be that you want to give your visitors some clue to what they're supposed to … more