Getting YouTube thumbnails for HTML
It's so simple to embed a YouTube video, with thumbnail into your site. Ditch any clever PHP scripts or completed jQuery libraries.
So you have a Youtube video - http://www.youtube.com/watch?v=t4_dZPVg8KI
Take the video ID t4_dZPVg8KI and craft yourself a link to YouTube's image server;
http://img.youtube.com/vi/t4_dZPVg8KI/1.jpg
You have a choice of 1.jpg or 2.jpg or 3.jpg
How easy is that!
WordPress/Shopp Shipping Calculator/Options Access-Control-Allow-Origin Error
I've recently been debugging a customer's WordPress/Shopp store. When the customer set the Cart & Checkout to be served over SSL the shipping calculator failed.
Serving Cart / Checkout / My Account pages over SSL is not built into Shopp for some reason. I have a post on this - SSL/HTTPS for Shopp pages or checkout process only. If you use a shipping calculator, or offer different shipping methods this will fail.
[Snippet] Debugging Smarty on a live site
Development server? Staging server? What are they? Sometimes we have to debug code on a live server. You know it.
Adding the following code to your Smarty template will enabled the Smarty Debug Console for your eyes only.
- {if $smarty.server.REMOTE_ADDR == 'YOUR.IP.ADDRESS'}
- {debug}
- <pre>
- </pre>
- {/if}
Money Website of the Week
The Sunday Mirror voted my customer's site - CompareMoreDeals to be their Money website of the week this Sunday. Propa bo.
T site which searches and compares thousands of offers from daily deal websites such as Groupon, Crowdit, Wahanda and Likebees.
It’s aims is to save time by doing the comparisons for you.
You can search by category, such as restaurants or fitness, or by location.
Cities covered include Aberdeen, Bristol, London, Cardiff, Manchester and Liverpool.
[Snippet] Allow PHP in Smarty (CubeCart 5)
Although it is generally bad practise to put PHP code directly into your (CubeCart 5) Smarty templates, its sometimes inenvitable.
You will need to edit controllers/controller.index.inc.php
How To List A Custom Post Type’s Taxonomies And Terms
Jennifer M. Dodd has published a brilliant article on listing post taxonomies / terms / formats & categories. I love it!
Entitled How To List A Custom Post Type's Taxonomies And Terms, she offers two functions that cover displaying all custom taxonomies, terms, post formats, categories and tags.
Just saved me hours writing my own. Thanks!
New Site: Salford City Stadium
A fantastic show case site for the new Salford City Stadium for Salford City Council. Developed in WordPress I was involved in the Events Management and booking system. Set to be used by thousands of people when the stadium opens. One of the first Government based sites to use WordPress!
Highlighting current page in WordPress Menus
By default, wp_nav_menu doesn't create a .current_page_item or .current-menu-item class for certain elements in a wp_nav_menu, for example if you are viewing a custom post type archive or single page.
Here's some code to fix that. Bang it in functions.php
Don't forget to create your CSS classes if you already haven't done so.
Redirecting a custom post type
Ever had to rename a custom post type? Pain in the ass. Lets just redirect it instead.
Edit your functions.php
- add_rewrite_tag('/<old name>/','<new name>','top');
Simple as that.
WP-Ecommerce documentation still sucks
WP-Ecommerce documentation still sucks.
I'm sorry too!








