Currently Browsing The Code Snippets Tag

Rename the wp-content folder

Posted on 30th September, 2015 Leave a Comment

First select the wp-content folder and give it your chosen name (assets, stuff, content…) For this example I’m going to name it stuff. With that done, open your wp-config.php file and add the four lines below, above the require_once(ABSPATH . ‘wp-settings.php’); line at the bottom of your file. With this done all files uploaded will…

Theme creation basics

Posted on 1st February, 2015 Leave a Comment

Adding Widgets to your theme Open your functions.php then find or add the register_sidebar function. Then to display the widget area in the theme, because we’ve created a footer widget let’s include this call where it should be displayed. Adding new image sizes: In your funcions.php To display these in our theme. For example if…

Adding a sticky header to your WordPress theme

Posted on 21st June, 2014 Leave a Comment

Sticky headers have been popular for quite a while now, I think this is due to the increase in mobile traffic to websites. As pages become narrower they also become much longer, so a sticky-nav is quite a nice thing. I’m sure that there are quite a few of these tutorials online, but for me…

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…