We Blog

A store of our collected wisdom.

Creating a semitransparent intro area above page body. And some other page customizations.

Last night in the Beaver Builders Slack channel (if you're into BB and Slack, go check it out, great place to hang around), @danfrybort asked me how I built the semitransparent intro area on this page, which is, by the way, a work in progress, so things may change after I publish this post. There are a few different things going on here and it took me long enough to figure out, so I figured I'd just write the whole thing up. First, there's the way I handled the page title and selection of the header and footer images. I used Advanced Custom Fields (ACF) to build a field group that allows the user to choose from several different color options for the semitransparent … [Read more...]

Beaver Builder and Simple Image Sizes don’t like each other

I had a variety of custom image sizes that I defined by using the plugin Simple Image Sizes (which, by the way, is really easy to use and a time-saver if you don't want to muck with code). When I used Beaver Builder to rebuild the site I'm currently working on, I found that I could no longer select from those custom sizes when using the Media tool. I deactivated that plugin and just did it in code by adding this to functions.php: Not to say that the problem is with Beaver Builder; it could just as easily be a problem with Simple Image Sizes. Since that plugin is pretty popular and I probably won't be the one to have this problem, I thought I'd share the … [Read more...]

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. You'll get a zip file with a full package ready to go, and they'll even offer the HTML you need to put into the <head> of your documents. Because we're talking about WordPress here, you have to change their default path like this: Copy/paste this code and drop it in the field you see there: You're going to put the resulting code into … [Read more...]

Blowing Smoke: Are HTML sites a better bet than WordPress?

It's kind of painful to look at that title. But today, a new client of ours forwarded a comment made by his current web developer: [your site is] manually coded using HTML, CSS, Javascript, and JQuery in order to provide the greatest possible visibility to search engines over time. This is because WordPress websites, with their database driven back-end, score lower in search engine rankings because each page is not assembled until the visitor requests it, unlike [your site's] pages which remain online, even when they have not been requested, and are therefore indexed by Google daily. My jaw literally dropped, because wow...that's wildly out-of-date thinking. Frankly, I … [Read more...]

Flip 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 You're welcome. … [Read more...]

Check 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 the page they've requested. If it's that page or any of that page's children, they're redirected to one URL. If it's mobile but not that page, they're redirected to a different URL. Works perfectly! … [Read more...]

Don’t block me, bro!

I hate it when websites pop up ads – or worse, those survey things – over the top of the content I'm trying to read. Seems like this guy feels the same way. The worst case I've seen was with a local funeral home. I was sitting in a meeting with a funeral director client and we were discussing a feature he wants to add to his site. We were poking around the web to see if any of his competitors were adding the same service to theirs, and we happened across the site of one of the larger funeral homes in the area. These guys had added a pop-up survey to their site! Our mouths literally dropped open when the window came up; who in their right mind would agree to take a … [Read more...]

Fetch 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 content in a specific "content block" in a page template. Enter get_post(). … [Read more...]

Tribe 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 clickable. The whole screen was greyed out. Having seen this before, he poked around in the code for the page and changed the z-index to the ridiculously high: z-index:1000000; in order to gain access to the button. The bug has been duly reported. … [Read more...]

Rapid 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 more...]