Code Snippets

Extending your Genesis theme with add_theme_support

If you build WordPress themes you’ll already be familiar with enabling features using add_theme_support. This function provides an easy means to enable optional features on a per theme basis – WordPress’ custom logo, custom background, title tag support and many more. It can also be used to extend your theme with custom functionality, and that’s […]

How to filter the FacetWP Google Maps options

This morning I was helping to work out some issues with a site using FacetWP and came across a useful filter contained within the Facet WP Google Maps addon. Documentation for the Google Maps addon is a little sparse at the moment, so I thought it would be helpful to highlight the facetwp_map_init_args filter, which […]

Enqueue Conditional Scripts & Styles for Internet Explorer

It can be challenging to develop websites that look good across all of the different web browsers. Different browsers have their own quirks and nuances, which you’ll only really become aware of with experience. Recently I’ve started using Flexbox on a couple of projects, and really like that it makes complex layout and positioning issues […]

Add the day of the week as a body class to your WordPress website.

I’m a regular in the GenesisWP Slack channel, and love tackling little code problems or offering support where I can. One such conundrum came from a question by Paul Smart, who had a client ask him to add different styling to elements on the website depending on the day of the week. By filtering the […]