I didn’t cook this snippet up, I found it over here. And I’m reposting it with some tidying up because I know I’m going to be reusing this… Because if you’ve made use of the Genesis Custom Headers, you may have got frustrated with them too (especially on older themes, I think). This code will… [Read More]
View the code on Gist.
In the latest site build I’m doing I had been asked to conditionally remove genesis’ footer widgets from particular pages – in this case from everywhere except the front page. I found a snippet over at Dream Whisper designs that was specific to a site whose front page is their blog page, but mine was… [Read More]
This is an updated snippet which has received significant input from Gary Jones, author of the terribly useful book Changes in Genesis 2.0. Don’t be too proud to learn from others, people… it makes you a better coder. View the code on Gist.
I can’t tell you where I found this snippet, but it has proven really, really useful. It’s a snippet to create custom post types in bulk, simply by adding a couple of variables to an array. If the code is yours, let me know and I’ll give you credit for it! I put this code… [Read More]
This useful code snippet allows you to display the WordPress template used. It’s brilliant for troubleshooting and is also helpful in starting to get your head around WordPress’ templating system. By default the snippet outputs to the wp_head hook, however you can add it to any wp hook (or genesis hook available). In the image… [Read More]
Sometimes you really just need to be able to turn your widget title into a link. Sounds easy, right? Wrong… By default WordPress strips HTML from widget titles… This sneaky little snippet allows you to shortcut that function and add HTML to widget titles. View the code on Gist.
I needed to be able to add a class to ACF Repeater Items. I’m slowly learning this PHP malarkey and this code snippet was the result of figuring out a PHP counter and setting it up to count through ACF Repeater group data and add the class only to every third item. View the code… [Read More]