Snippets
Replace WordPress default favicon – and add a full package of icons for mobile and desktop
There’s a really great favicon generator out there that will take your icon and turn it into every file size and type you need for a full range of icons for mobile devices, desktops, and even a Windows tile. Prepare your artwork at least 260px square (transparent PNGs work great), and head over to RealFaviconGenerator.net.…
Read MoreFlip position of site title and description in Genesis
You wouldn’t think this would be so hard to find, but it seems nobody has written how to put the site description above the site title in Genesis. Or my google-fu is exceptionally weak today. In any case, it’s actually quite easy, and this is a whole lot safer than mucking about with CSS positioning: https://gist.github.com/transmitstudio/611b285816b2824734a5…
Read MoreCheck for mobile and redirect
So today I needed to send users on mobile devices to an external URL. That’s easy enough, but the client needed users headed to a different external URL if they were headed to one particular section of the site. In the code below, I use wp_is_mobile to test the browser; if true, then I check…
Read MoreFetch and display the contents of a specific post by ID
Once in a while you come across something that is so simple and yet so immensely useful. I needed a simple way to display the contents of a post inside a page template. I’d set up a CPT for “Content Blocks” so that a user could create custom content and I could then display that…
Read MoreTribe Events Manager CSS bug
Joe found a problem with Modern Tribe’s Events Manager PRO plugin today. He wanted to change something on a recurring event, but when he tried to save the change, he had a window popup asking if he wanted to change just the one event, or all of them. The problem was that the button wasn’t…
Read MoreRapid WordPress site setup via Terminal
Setting up a new WP site is pretty quick, but it’s still tedious after you’ve done it dozens of times. We’ve been combing the net, looking for ways to make it happen really quickly. Here’s what we have so far:
Read MoreCenter menus in Genesis
It drives me nuts that there’s no obvious, easy way to center the nav bar in Genesis (or, to be fair, in most WordPress themes/frameworks). Stumbled across this the other day and found it works really well. If you are using a subnav, change #nav to #subnav in the above CSS. If you are using…
Read MoreDetect Mobile Browser and Serve Up Alternate Content (or nothing)
The site we just built for faithandform.com has a pretty cool slideshow feature on the home page, serving up a portion of the four most recent issues’ cover images and tables of content. But it doesn’t work well at all on small mobile devices, so Joe and I spent some time poking around the tubes…
Read MoreExclude Posts, Pages, or Categories from Search Results
I tend to use pages or categorized posts to fill widgets on home pages, because it provides users with an easy way to change various areas on their home page or sidebars. Sometimes, though, we don’t want that content to show up in searches. Here’s how to exclude them:
Read MoreForce full-width layout with Genesis and CPTs
I needed to force a full-width-layout on my single custom type page. After a bit of trial and error, I ended up with this code: Just replace CPTNAME with your custom post type name and you’re good to go.
Read More