Blog
It took me quite a bit of research to figure out how to modify the home page query to use a custom post type archive. Here’s what it takes… 1. Set the home page to display a static page On the Settings > Reading page, make sure the “Your homepage displays” option is set to […]
Read MoreWhat is a Widow? When referring to text on a website, a “widow” refers to the final word of a heading or paragraph that wraps to its own line. Like this: To prevent this from happening, we can use the HTML entity for non-breaking spaces between the last two words: A non-breaking space prevents the […]
Read MoreI was making an AJAX call and was getting a “Cross-Origin Request Blocked” error. It wasn’t clear where this error was originating, so I did a little research and here’s what I came up with. When the server determines that the script making the AJAX request is on a different domain, depending on the server […]
Read MoreGoogle’s reCAPTCHA can easily overflow it’s parent at small screen sizes. Let’s fix that. Since the reCAPTCHA sits inside an iframe, we can’t target its individual elements with CSS. We can limit the iframe’s width, but that simply hides any part of the iframe that doesn’t fit within our new width. The code below reduces […]
Read MoreWhen WordPress loads jQuery, it doesn’t provide access to the $ function. Since I’m typically wrapping my code in a .ready() function, here’s the code to get access to the $ function at the same time: This code is posted all over the internet, but it always takes me some time to find it each […]
Read MoreI know this is documented in various places around the web, but I’m tired of hunting it down whenever I need it. Often when working with websites and code, I need to locate any files that contain a particular string. This command searches a folder recursively and prints out the filename of any files that […]
Read MoreThe project I was working on today required a custom post type that included a custom taxonomy. Setting this up on the back end was simple. However, when I went to the front end, all the posts in the custom post type were missing from the custom taxonomy archive. Since it took me way too […]
Read MoreThis post is primarily a reminder to my future self. However, I don’t think I’m alone in this struggle. Migrating WordPress multisite can be quite a challenge, especially if you’re migrating from a live site to a local development environment. If you’re using http://localhost as your local development environment root with individual sites placed in […]
Read More