WordPress Archive Redirection (Single Items)
If you are using the standard archive-[custom-post-type] and single-[custom-post-type] theme structure for your Custom Post Types, you may come across a situation where the archive-[custom-post-type] needs to redirect to your first custom post. So, rather than duplicate code across templates. Duplicate code is messy code. You can use the wp_redirect function.
Overwriting WordPress loop parameters per page
In some instances you may want to overwrite WordPress loop parameters per page.
For example, a recent request from a client
"Can I have all my portfolio items on a single page?".
Yes, client, you can. "Portfolio" is a custom post type. Using Everett's Custom Content Type Manager. The theme is fully structured so it uses single-custom-content.php and archive-custom-content.php.
Custom Shopp Gallery with FancyBox
Following on from a previous post Custom Shopp Gallery, here is how to do make a custom Shopp gallery with FancyBox.
Removing l10n.js in WordPress
l10nn.js is a JavaScript library that enables localization through native JavaScript methods, gracefully degrading if the library is not present. WordPress 3.0 enables l10n.js by default and most of the time if you are working on single language, non-localised WordPress sites, you can safely disable it and save yourself a few bytes of code at each page load.
Clean code is happy code!
Adding image to Shopp’s cart page
This is asked an awful lot on the Shopp Forums. User's want to see a product thumbnail in their cart page next to the product name. It's really quite simple.
Really Simple WordPress Post Filtering
Sometimes you don't want to show every post category on your WordPress site home page, or any WordPress for that matter.
Luckily there is a really simple way of filtering posts. For example if I want to exclude certain categories from the home page, I could do the following...
Using custom CSS in cForms
Pretty much every WordPress installation I've done in the last few years has got cForms installed. Its one of the must have plugins.
Many people are unaware of the custom CSS options available in cForms. Ever edited a default style and lost it during an upgrade? Annoying isn't it?
Here's how you make a custom, upgrade proof CSS skin for your cForms.
Custom Post Type Index/Archives
Custom Post Types have come a long way recently.
Custom Post Type index/archives have been around in WordPress since 3.1., but very few people seem to use them. They came out of a bug (#13818) on the WP Trac.
Force jQuery Version in WordPress
Here's the right way to load a specific version of jQuery in WordPress. With each new version of WordPress we generally get a new version of jQuery, this can sometimes cause issues with other jQuery scripts you've loaded.
- function force_jquery_version() {
- wp_deregister_script( 'jquery' );
- wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js');
- wp_enqueue_script( 'jquery' );
- }
-
- add_action('init', 'force_jquery_version');
Rebranding WordPress 3.2
Woah. The new WordPress 3.2 admin interface is much better! Theres a lot of much welcome improvements.
I've upgraded a few blogs as test cases. Rebranding is mainly portable from 3.1 and below with one notable change.



