The HTML checkbox input is one of the oldest elements to be introduced to HTML. So it’s no surprise that I’m tired of looking at them. But the element is crucial to forms and not going away any time soon. I prefer the look and feel of toggle switches, possibly because of the iOS toggles […]
Symptom: WordPress running on NGINX cannot upload images or files. You may see an error message that tells you “permission denied” in the media uploader. Naturally you check permissions on your uploads folder, but the permissions appear correct. You might have even tried setting chmod permissions to 777. However, none of this will help if […]
Often when people truncate text in their WordPress excerpts or sample text, they simply limit the total number of characters and add an ellipsis. It’s pretty easy to do, but it usually ends up with a word being broken at the end. For exampl… This function will truncate any phrase by the number of words […]
Wow, that was a long title for this short article. First off, I am assuming that you know how to add JS scripts to your WordPress admin. If not, you need to know that first. So without further ado… if ($ === undefined) { $ = jQuery; } if ($(‘#custom_taxonomy_id-pop’).length) { $(‘#custom_taxonomy_id-pop’).remove(); $(‘#custom_taxonomy_id-tabs’).remove(); $(‘#custom_taxonomy_id-all’).show(); } […]
I’ve seen this Bootstrap issue countless times. A collapsed div is collapsed and expanded with Bootstrap Collapse. When it opens up, it appears to over-expand and then jump back up. It’s super annoying. Here’s what your code might look like: <div class=”collapse alert alert-info” id=”my-alert-box”>My hidden alert box with some text.</div> Here’s what you should […]
Ad blocking plugins can easily cut into any website’s revenue. Not sure if it’s happening to yours? You can use this simple method to find out just how much your traffic is being affected by AdBlockers.
Today I went to import a large number of posts from a live Wordpress site to a local copy of the site. We all know that the Wordpress Importer tool hasn’t had much love lately and is slightly broken. PHP will time time out you and drive you crazy if you try to use it.
Phone numbers have got to be one of the most commonly gathered bits of information in forms. I created a little PHP function that formats them for the most common US strings, 7 or 10 digits. The Function // FORMAT PHONE NUMBERS function formatPhoneNumber($variableName) { global $$variableName; // Keep numbers only $$variableName = preg_replace(“[^0-9]”, “”, […]
If you’ve ever tried adding a background to the body element of a web page, you may have been a tad frustrated. By itself, the background will only cover the used portion of the page. If the height of the browser window is taller than the page, your background is cut short.
Permanently moving one domain to another is a huge task. Creating a single redirect for each page on your site is unrealistic and would suck the very life from your body. Well, relax – there’s an easier way, using htaccess. This will redirect all of your pages to their respective new pages on your new […]