Doesn’t Load Until I Scroll – Delayed JavaScript

Image of phone with the title of the article overlaid

I solved a somewhat strange issue on a client’s WordPress website the other day. On their products page, none of the products would load until the visitor scrolled or otherwise interacted with the site. A “loading” icon showed up, but nothing would load until an action was taken. In this case, they were using the Essential Grid plugin on a … Read More

How to Pass a PHP Variable to JavaScript – Easy Way

For something seemingly so straight-forward, you would think that the information out there would be a bit better on this subject. Passing a variable from PHP to JavaScript is actually very easy! There are just a couple things you need to keep in mind and some ways to do it to ensure it actually works. I find that putting the … Read More

How to Pause JavaScript – Chrome

When you are developing a website, sometimes you just need to pause JavaScript so that you can work on something. There’s nothing more annoying than that stupid image slider that just won’t sit still long enough for you to troubleshoot it. But how do we pause JavaScript? Internet trolls and people who don’t know any better will tell you to … Read More

Trigger JavaScript from Embedded Wistia Video – WordPress Tutorial

I’ve recently had the opportunity to do some work with Wistia videos embedded into a website and had the challenge of having events trigger from the videos. In my case, I wanted some JavaScript to run after the videos concluded. Specifically, I was working with the Sensei WordPress plugin from WooThemes and wanted to hide the “Complete Lesson” button until the … Read More

Radial Search & Results Page – WordPress Tutorial

Performing a radial search (showing results based on location, zip code, etc) in WordPress is one of the hardest things I’ve had to figure out how to do. It held me back in many projects and was always a source of frustration. After trying many different plugins and tutorials, I have finally come up with a working solution. Today I’m … Read More

Simple Dropdown Hover Menu Fix for Mobile Devices

Droplets of water on leaves.

If you have an existing, older website that you want to make mobile-friendly, here is a really simple solution to the problem where mobile users cannot access sub-menus in your main navigation. Nothing is more annoying than tapping a menu item, seeing a sub-menu pop up but immediately getting sent to the next page before you have a chance to … Read More

Pass PHP Varibale to Javascript – The Easy Way

Young Blanding's Turtle stretches out its neck.

Taking a variable from PHP and sending it to javascript seems like a really simple thing to do. But it’s not. I’m sure if you ended up here, you’ve tried and tried to get it to work with little success. I’m not sure what the people online are talking about, none of those solutions seem to be functional in most … Read More

Passing a PHP Variable to Javascript in WordPress: The EASY Way

Close Buildings

If you’ve made it here, odds are you’ve already been through the depths of the internet, full of “simple” tutorials talking about how easy it is to pass a variable in your PHP code to Javascript in WordPress. Maybe they even have simple, foolproof examples. The only thing is, they don’t work. WHY don’t they work? Who cares! They are … Read More

Dropdown Menu of All Terms in Custom Taxonomy – WordPress

Built-in to WordPress is a nifty function, wp_dropdown_categories, that is supposed to list all your categories in a drop-down menu and, with the right script, link directly to them. It even has an argument for using it with a custom taxonomy. The only thing is, it doesn’t work. It doesn’t produce the appropriate link. It appears to produce a link like /?cat=# … Read More

Redirect to Mobile Website – SUPER Easy Tutorial

I spent literally hours searching for a good, easy-to-follow how-to on setting up a javascript redirect on your website so that mobile visitors get sent to your mobile page to no avail. It needed to be extremely clear and with great examples and I wanted a method that DIDN’T rely on screen-size because, well… That’s just stupid. You don’t want … Read More