Currently Browsing The Must Have Snippets Tag

Creating custom post loops for WordPress

Posted on 7th January, 2016 Leave a Comment

So I know this has a ton of coverage on Google, but I thought I would add my own post on the subject as I use this blog as my own reference (which is the entire reason I created this site) with a few examples. Let me give you a quick breakdown of how a…

Create a Custom WordPress Login Page

Posted on 19th September, 2015 Leave a Comment

So you want to customize the look of the default wordpress login page, first thing to do is add this to your functions.php Then create a new CSS file and save it within your theme folder in a folder called login. custom-login-styles.css Now you’ll just need to add a few images to complete the transformation.…

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…

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…

Create a better options page with the theme customizer

Posted on 4th March, 2014 5 Comments

Since WordPress version 3.4, there has been a rather underused theme customizer, which allows the end user to view any changes made to the theme in a window next to the customizer! Now that’s super cool. You can grab this options.php page from the WPtricks starter theme on GitHub, along with a contact page template,…

How to build a dynamic sitemap for wordpress

Posted on 14th October, 2013 Leave a Comment

I always like to include a built in sitemap page to my themes (without using a plugin). So thought I’d include this quick tut on how this is achieved. Also to give the end user some control over whether this should be displayed, I’m including this as a template, for use with WP pages. This…

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,…

Create a built in contact page for WordPress

Posted on 21st September, 2013 2 Comments

I do this for every theme I create and figured most of you would use a plugin, which is not really necessary. WordPress has mail functionality already so all we’re going to need to do is leverage that and add some style in the CSS. Uses the administrators email address Adds your site title to…