How to ensure WordPress template tags work properly when using multiple WordPress Loops

Tuesday, 8th December 2009

There are many occasions when you may want to create multiple WordPress Loops – instructions on how to do this can be found on the WordPress Codex.

If you need to keep the original query, it is suggested you create you second loop by creating a new query object.

<?php $my_query = new WP_Query('category_name=special_cat&posts_per_page=10'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
   <!-- Do special_cat stuff... -->
<?php endwhile; ?>

This works fine, but if you use more template tags after this loop, they display the content from the last post in the $my_query loop. So, if you want to reference the original loop how should you go about it?

Read the rest of this entry »


WP e-Commerce XML Sitemap WordPress Plugin

Saturday, 28th November 2009

I was just about to update an old plugin I created to create an XML site map for products in WP e-Commerce…

…then I stumbled across the WP e-Commerce XML Sitemap plugin by Lee Willis.

The plugin worked well with WP e-Commerce 3.7.5 (the latest version) apart from a few minor issues. I got in touch with Lee and suggested a few tweaks/fixes – he has just released an updated version:

  • Unpublished products are now not added to sitemap.
  • Is now compatible with WordPress installations with custom table prefix.

You can download the latest version here…


New style hooks for WordPress Theme Developers in WP e-Commerce 3.7.5

Thursday, 12th November 2009

The latest version of Instinct’s WordPress e-commerce plugin uses the WordPress body_class filter to add classes to the HTML body tag.

WP e-Commerce 3.7.5 adds the following styles to the body tag:

  • wpsc
  • wpsc-home
  • wpsc-single-product
  • wpsc-single-product-id
  • wpsc-category
  • wpsc-category-id
  • wpsc-group-id
  • wpsc-shopping-cart
  • wpsc-transaction-details
  • wpsc-user-account

These extra classes will give you more flexibility when designing themes for WP e-Commerce.

Read the rest of this entry »


Mac OS X SOAP Client – Fixed for Leopard

Wednesday, 28th October 2009

Upgraded to OS X Snow Leopard, Yeah…
Mac OS X SOAP Client not working, boo…

Mac SOAP Client
Mac OS X SOAP Client is a great little app which can be used to access and query XML Web Services. I was very disappointed that after upgrading to Snow Leopard the XML result preview tab kept crashing the application.

Fortunately the application is now an open source project available on Google Code and it was only a short matter of time before someone came up with a fix – thank you Howard.


Why is my Safari icon pixelated?

Tuesday, 20th October 2009

Why is my Safari icon pixelated?

No idea why or how this happened.

Seemed to happen not long after upgrading to Snow Leopard. Had a search around and found other people had been experiencing blurry/pixelated icons too. Also, this thread on the Apple Support web site.

Anyway, I just dragged the Safari application into the dock again and that fixed it for me – weird…