Code snippets & web design tutsSubscribe Now

if iPad if iPhone add javascript

I was using isotope for a site and found that my iPad was having trouble with the Js so used this to use css to align the posts and load the js if it was any other device. Hoe you find this as useful as I did. var iOS = false, p = … [Read more]

New default avatars in WordPress

This I picked up from, quite a while ago and just forgot to publish the post. Add this to your functions.php   // add more default avatars to options if (!function_exists('fb_addgravatar')) { function … [Read more]

Hide your wp-admin page

If you'd like to hide your admin page from hackers then the easiest way to do this is through your .htaccess file, so you'll need FTP access to your server. Copy paste this into your .htaccess change the domain-name to your domain, minus the … [Read more]

My way to add a featured article for each category

This might not be the best way to achive this but it's how I've gone about it recently. First I create my categories: name: Category One  -|- slug: category-one name: Category Two  -|- slug: category-two name: Category Three  -|- slug: … [Read more]

Remove the phantom paragraph tags from iFrames and images in wordpress

If you're finding positioning your images and iFrames a little tricky inside wordpress because of all the phantom <p> tags that appear wrapped around them, then add this to your functions.php //filter the <p> tags from the images and … [Read more]

Preserve HTML in Category Description

If like me you'd like to add a little HTML to your category description, including adding an image, bold type, unique fonts then you'll need to paste this into your functions.php. //Allow html in category description $filters = … [Read more]

CSS3 Tooltips using the data- attribute

Thought that I'd add a little snip that'll add a nice tooltip to any html element, this uses the data- attribute to create the tooltip, but you could use the alt tag or the title tag just replace the attr() in the css. See this example on … [Read more]

Tabbed Content with jQuery

Ok this isn't my own script, but it works really well. So why change it if it ain't broke! Find the source of this article HERE <ul class='tabs'> <li><a href='#tab1'>Tab 1</a></li> <li><a … [Read more]

How to filter a wordpress feed

So to carry on with my feed exploits, today I had the challenge of displaying tags from a single catagory inside a RSS feed. After having a little play around I discovered that you can filter feeds by catagory, tag, search result etc... so lets … [Read more]

Remove extra image sizes WordPress media uploader

This little beauty I found on it'll stop the unneeded image sizes from being created. An absolute must if your uploading the correct sized images to your blog, just because your WordPress media folder can ge a little bloated with … [Read more]