Adding script tag embed to Gatsby component
This one broke my heart for a could of hours, which annoyed me as it really shouldn’t have. I like working with Gatsby but the clashing versions and updates really drags the progress down. This project I hadn’t opened in a few months and it basically started crying when I ran it due to the […]
Read MoreGet more than 100 queries in GraphQL (I felt stupid)
Hi pals. I’m not a seasoned GraphQL fella yet, so this one surprised me. Using GraphCMS, I was happily adding more content to my main datatype (‘artists’) when I noticed it wasn’t updating. After deciding it wasn’t caching etc, or anything at the GraphCMS end, I googled a little and found that GraphQL by default […]
Read MoreAnimate on Scroll (AOS) into Nuxt js
Hello pals. Well here’s another sticky one that caught me for a while, and after trawling the blogs I got her going. Firstly, install AOS. This didn’t work for me with Yarn but worked fine with NPM. Then, create a plugin file in your plugins. Crucially, add .client to the name…aos.client.js Inside that plugin file, […]
Read MoreWordPress Super-admin hack
Came across an interesting hack yesterday, which was a new one on me. I noticed a site I had been working on had been hacked into and some redirect crap added to it.There was some folders full of redirect junk sitting in the WP root and some nasty little redirect rules pertaining to them in […]
Read MoreAdd content or ACF field under thumbnail/image gallery in Woocommerce
Today I am adding some content right underneath the gallery in Woocommerce single product. If you’ve worked with Woocommerce before, you’ll know that the single product is layed out using float. Actually a lot of woocommerce is. I can’t tell if I love or hate this! On one hand, using float is agnostic in terms […]
Read MoreNuxt view localhost on device over WiFi (IP)
Say you are running your Nuxt site as normal on localhost:3000, and you want to run it off a tablet or phone or something over the same network
Read MoreAIO WP Migration: Import stuck on “done preparing blogs” or “done preparing plugins”
The awesome AIO WP Migration is a fantastic tool for backing up and moving WP sites. It doesn’t come cheap for Multisites, but if it’s a single site, it’s hard to find a plugin that does a better job. Do yourself a favour and buy the unlimited extension, and literally give yourself back hours and […]
Read MoreNuxt Ecommerce (Snipcart/Stripe)
All you need to set up a product with custom fields with Snipcart and Nuxtjs
Read MoreGenerate static Storyblok site with dynamic pages (Nuxt.js)
When generating a site that takes content from Storyblok in Nuxt, I noticed initially that the pages weren’t being built out.
Read MoreGet language of post from WPML | Only show certain language
Do you need to use the WPML plugin? Well if you do and you need to restrict something to the current language, here’s how: First, get the current language Echoing this will give me en on my English language page Next, whilst in a loop of posts, get the language of each post: Here, in […]
Read MoreWP | Gravity Forms | Change error message text
For a popular plugin I was surprised by how inconvenient this was to do. But hey, I guess they have their reasons.
Read MoreGetting fast core web vitals with WordPress
In the course of my daily rounds I was interested to see how svelte I could make the core web vitals on my own site. What are core web vitals? These are three tests for a webpage: how quickly page content loads, how quickly a browser loading a webpage can respond to a user’s input, […]
Read MoreGatsby build : files not found / Failed to load resource
When you’re in development, everything is great. But after running gatsby build, your js plugins and fonts are all broken or missing So to fix this, first run Then, go to your gatsby-config.js file, and add the location of a server where you will be accessing the site. You can edit it later, but for […]
Read MoreMake things same height | Javascript | JQuery
It’s not your fault, but it is your problem – how to match element heights with jQuery
Read MoreNuxt vs Gatsby initial thoughts
I have learned a lot from the Gatsby/GraphCMS experience so I wasn’t completely cold going in, but I must say, it seems a lot more tolerant of me and my code. But perhaps this is a Vue thing eh? It always felt easier to get along with.
Read MoreRewrite domain to subdirectory without anyone knowing (WordPress / .htaccess)
Well this one is a bit of a doozy. Anytime there are any htaccess rules to implement, it always seems that there are 1000+ possible ways to do the same thing, and many don’t work. Well I have an issue today. I have placed a WordPress install into a subdirectory, and I need the domain […]
Read MoreACF Repeater every nth pattern layout
If you are using ACF Repeater, sometimes you want to repeat a pattern of HTML to display, let’s say, a grid of images that has 6 variations
Read MoreAdd Fields to MailerLite Forms
One of my pet peeves is the way companies like Apple sometimes prefer beauty and ‘tidy’ layout over ease of use in their UI. I always have to Google how to use iMovie, for example. There’s just a big open blank canvas with no clue as to what you are supposed to do. Anyway – […]
Read MoreCheck if WP page has parent and link back to it (breadcrumb)
Here’s a quick home-made breadcrumb for WordPress in case you aren’t using the built-in Yoast one or whatever. Add this to your template:
Read MoreResponsive Font Sizes without media-query
I think I’m getting comfortable enough with where the browsers are to ignore the Explorers and the old Safaris a bit more. I’m just hearing it less – “needs to work on Explorer” is something I haven’t heard in a year, and when I did, that was for a modern enough version, so I’m gradually […]
Read MoreCreate varying video heights with SCSS based on the number of posts (wp_query)
I needed to calculate the height of a video tag based on how many were on screen, inside a wp_query loop. Here’s what I did: Then inside the loop, where there might be a video to be displayed, I added a class with the countage variable stuck to the end of it the class ‘hasvideo_<?php […]
Read MoreQuickly get to folders in CMD
When jumping around different folders in the CMD line, I’ve found using AutoHotKey really handy. Below are three scripts that I use to quickly jump from WAMP to Flywheel and back without typing out paths like a big fool. Also at F8 I have put a command to kill the nginx server. Try it out, […]
Read MoreWoocommerce shop item title class & html
This is a quick one but useful… Say you want to change the default H3 title to a P class and add a few classes. Simply plug this into your functions file and you can switch these things around without worrying about future updates or templates etc.
Read MoreEqual heights of elements with Vanilla js in Shopify
This function (original from CSS-tricks) helps to equalise the heights of anything, especially useful in a loop. So in Shopify (or anywhere really) I might have titles that sometimes are pretty long, and on a mobile, they are wrapping and causing heights to be uneven. Here, we add a class to the html (in this case […]
Read MoreReal Quick Gulp SCSS to CSS setup for small project
Ever wanted to just quickly squish SCSS into your small project? It’s node so there is a bit of faffing and cramming modules everywhere, but here’s a quick, small setup Initiate a Node project & install Gulp and Gulp CLI. Install the gulp-sass plugin and the del module Project structure will be: index.html (link to […]
Read MoreMP4 Video embed that actually works on iPhone
If you’re inclined to design or get designs with mp4s embedded in them, you’ll know that iPhone starts crying a lot of the time with them. Well after much mooching around the place and trying to get this under control I think I finally have a good working system. It’s seemingly down to the ‘playsinline’ […]
Read MoreCollection dropdown filter for Shopify
Heyo, I found this wasn’t too easy to find any help on so I just built my own function and thought I would put it up here. I needed a filter for the collections in Shopify. Here’s the filter dropdown from the collection-filters.liquid file:
Read MoreBolt CMS migrate whole site
Hey, so I am using Bolt again to build a website – there are lots of reasons why you might do this, and here are a few of mine right now – Oh man, do I want a change from building WordPress themes all the time. See reason 1 No database – it’s just flat […]
Read MoreClose all ACF field panels
ACF fields – one of the handiest WordPress plugins of all? Well I use it a lot, and th einternal WP pages can get a bit crazy-looking after a while. To shut everything up by default, use this (add to your functions file):
Read MoreCoronavirus / Covid-19 WordPress alert plugin
Hear me now, Lockdown Legion. Okay, so a lot of clients are asking for some sort of notification on their sites about the Coronavirus. Many (most) business owners are running WordPress sites so I have built a plugin to do this for them. I will be tarting it up slightly and sending to the WP […]
Read MoreEmbed Youtube vids – quick setup
Okay real quick – this is a whittled down bit of started code from the Youtube docs. But I do find myself searching around for a while to find it every time I need to remember where to start with the Youtube api. Anyway, all I wanted was an embedded video player that I can […]
Read MoreContact Form 7 – The specified value does not conform to the required format, “yyyy-MM-dd
If you have something like this shortcode for a date input on contact form 7: Try adding in a date-formatted placeholder and you should clear the error.
Read MoreGet Google reviews & display in HTML
So I noticed a lot of people looking for something that just outputs the Google reviews onto your site from your Google account. Should be simple right? Well you would think it would be a little simpler than this but hey. It’s not too bad. You need a few things…. Get the google maps API. […]
Read MoreRemove Flamingo Spam messages Contact Form 7 WordPress (using SQL)
Remove Flamingo Spam messages Contact Form 7 WordPress (using SQL)Okay so this one is something I can see a lot of people are looking for. So Flamingo is great, it stores your contact form 7 messages and is a great tool if your client seems to be telling you the forms aren’t working, even though […]
Read MoreVueJS Simple Quickstart
So I’m building a stupid webpage that looks like a trashy magazine. The idea is you can change the headlines and images and get an image of it. But rather than vanilla JS which I was all about last week, I have grown bored of typing document.getElementById and now I want to cut corners again. […]
Read MoreHow do I fade things in on scroll JQuery
Okay, first off, everyone has wanted this effect forever. So it’s worth learning it! I have done this the hard way plenty of times and it’s one thing or effect that I don’t mind using a plugin for. Why? Well it’s just done well, it’s fast and I can just get on with building once […]
Read MoreHow do I put Facebook on my website?
So you want to put Facebook onto a page on your website. No prob! You just need to do three things. 1) Go to the Facebook Plugin page: here 2) Enter your facebook page url into the field marked ‘Facebook Page URL’. Change any other details if you wish. 3) Click ‘Get Code’ and you’ll […]
Read MoreHow can I send emails from my website?
Recently I was under pressure to splam a contact form solution into a one-page website at the last minute. Ordinarily if I am building something with html in PHP, I would use this Frankenstein version of Jem’s Mail Form which I have used happily for years. It does the trick without issue, and once you […]
Read MoreJQuery id starts with selector
This is a handy way to target any element with a common string in the id. an element with id=”yourstring-whatever” would be targeted this way. It does seem a little intensive on the DOM so maybe whittle down the elements to target it inside a container, thereby letting the browser know that it doesn’t have […]
Read MoreMake element square with Jquery
“Hell-o”. Here’s a simple and useful Jquery each function that takes the width of something and makes it’s height out of it. It also re-runs when the browser window is resized. I use it alot, it’s dead handy. You’re basically getting the width and making the height out of it. See js snippet below. Give […]
Read MoreNew Website
I thought I’d rebuild my site and take WordPress out of the frame. Why? Well I wanted to see how much faster I could make things, and to see if I couldnt learn a few things while I was at it. Also, there are lots of reasons why one might want to do this, but […]
Read MoreHow do you get royalty free music?
Okay so you need some royalty free music that isn’t that insufferable ukelele and whistling thing that all the banks and insurance brokers use. Youtube has always been my go-to for royalty-free music, because not only do you have plenty of good-quality uploads there, you find all sorts of uploaded content you could freely use, […]
Read More