To add multiple fields you’ll first need to create a small funciton in your functions.php Then in your searchform.php you can add hidden fields like this. If you want to do this with any other filter, for example categories. Repeat the above and replace post_type with cat.
You can add two types to the editor, the first one below adds a button to the “Text” version of the editor. The second enables and adds the “Format” dropdown to the “Visual” version of the editor. For the text version we’ll need to create the shortcode that’s going to be applied by the button.…
This snip will add a nofollow attribute to all external links.
To add some custom styles to individual category pages you can use this snippet to add a body class to our posts. functions.php
When you’re making a site responsive you don’t want images to have a set width and height, so to remove these from your them you will… Add this to your functions.php
So you’ve created your theme and you would like to switch to using a CDN for your scripts and CSS… Add this to your functions.php and replace the YOUR-SITE with the urls of the website and the CDN.
Firstly add this to your functions.php Then in your CSS hide the empty p tags that are already present.
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
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…
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…