Currently Browsing The Snippets Category

Moving the menu items in WP Admin

Posted on 29th January, 2015 Leave a Comment

This was a snippet I grabbed off of tutsplus! I’ve found this super useful when I’ve been creating customer themes to give a menu item a higher priority in regards to it’s use in the theme. functions.php

Next and Previous Posts Navigation With Thumbnails.

Posted on 31st May, 2014 8 Comments

A nice way of adding next and previous post navigation with thumbnails and a short excerpt. I’ve created a file that you can just add into your theme folder and call in your actual theme with this include snip; If you want to download my file then click here, otherwise you can copy and paste…

Adding Breadcrumbs without a plugin

Posted on 26th May, 2014 Leave a Comment

So there are plenty of plugins available if you just want to add breadcrumbs to your theme, but if you want something a little lighter then you could just add this to the theme functions.php. This adds a simple breadcrumb to your theme. THIS HAS BEEN RECENTLY UPDATED, I WISH I COULD REMEMBER THE ORIGINAL…

Custom excerpt length & Read More link WordPress

Posted on 26th May, 2014 3 Comments

I often want to use a custom excerpt length in my themes. Custom excerpts can be really useful whether they are being used for the archives, home page or even when being used in meta description! Being able to add just the right amount of copy to a section is easy with this snippet. New…

Redirecting with the .htaccess

Posted on 23rd May, 2014 Leave a Comment

To redirect www to non www add this to your htaccess file. To redirect all sub-domains to the main domain use this. To redirect a single sub-domain use this. Redirect a single url/folder path There are a number of ace tools to help you generate your perfect htaccess file, below is the one I usually…

Include PHP variables into jQuery

Posted on 25th September, 2013 1 Comment

There is a simple answer to this problem… To use PHP in jQuery you just need to add the jQuery to a .php document. I’m using the Cycle.js slider plugin in my 3x examples below. Which is plucked from this article Responsive Custom Post Type Slider If you would like to add an options page,…