Youtube video embed with autoplay and loop

Since the Youtube API update, we can no longer control certain aspects of the player with older parameters that used to work such as removing related videos on the end of a video. This is due to Youtube believing that seeing related and recommended videos helps enhance the user experience for viewers. I needed a … Continued

Make one Swiper slider control another

Not WordPress specific this one, but I love Swiper and occasionally you may wish to use 2x Swiper sliders together and have them controlled in a way that one controls the other.   This could be handy if you’re making a timeline and want some dates to control a carousel, or if you want a slider … Continued

Create your own button via a shortcode

Here’s a quick little snippet for adding your own shortcode which generates a button in any post or page from a single shortcode. Within the shortcode, there are 2 options to add a url for the button and the text that appears on the button itself.   Then, to add the button anywhere in a … Continued

Check if Gutenberg Blocks are being used in Post or Page

During development of a site for a client, they requested the site to be built using Gutenberg blocks. On import of other existing posts from a previous site (that wasn’t using blocks), we found that content was simply put into the page on import. This was fine, except the blocks we designed were fullwidth with … Continued

Animated Count Up – alternative to CountUp.js

Occasionally a project requires some stats to show off and there is no better way than by adding a little animation to the number values. Historically I would use a script like CountUp.js but on a few projects I used that on, ran into a few issues that needed attention to avoid console errors depending … Continued

Link to new page and scroll to anchor

Hmm, this one was a littel trickier than I thought. I quite often use jQuery Easing plugin to scroll nicely to sections using anchor links, but every so often you need to scroll to another page and to a specific section. This is all well and good when you want to scroll a one-page site … Continued

Output All Custom Field Data In A Loop – Including ACF Fields

During a recent build using Gutenberg editor, I needed to check the output of custom fields in a post as the fields weren’t displaying when getting called. To output all custom fields in a post loop, you can use this handy snippet to show all fields and it’s data. This also works for ACF (which … Continued

Make Bootstrap 4 dropdowns appear on hover

Bootstrap is awesome. I seriously love it and always use it for project builds. And that’s either Bootstrap 3 or 4 – whatever the projects require, I’ll usually always go with BS. When it comes to dropdowns, especially so in navigation menus, I always prefer dropdown submenus to appear on hover. By default, this is … Continued

Convert WooCommerce variation dropdowns into radio buttons

I had an eCommerce project where the client wanted to display options for their products as selectable radio buttons rather than the default select dropdowns. To achieve this, we need to write two functions: 1 will grab the selected options for the product, and for each variation available, write them to a radio button input … Continued