Will McLean is a designer and artist working in the Central Coast of NSW where he lives with his wife and 2 children.

Will draws and paints out of habit and addiction. He writes about his struggles on the battlefield of art in the Art Archive section of this site.

Will is a meticulous developer and favours simplicity and clarity within his code. He can’t stand writing things twice so searches for any way to automate. His experiments can be found in the Exercises section of this site.

Will designs within systems. No project is too small for a design system. He favours the unusual, if not, how can he progress? You can read about his work in the Case Studies section of this site.

a.

b.

c.

d.

e.

f.

g.

h.

i.

j.

k.

l.

Correctly setting a different number of posts per page on a WordPress archive page

m.

n.

o.

p.

Correctly setting a different number of posts per page on a WordPress archive page

q.

r.

s.

t.

u.

v.

w.

x.

y.

z.

aa.

ab.

ac.

ad.

a.

Using trigonometry to create a diagonal strikethough style with js ( Knowledge Base )

I recently had to make a diagonal strikethrough style to use on single word throughout a site. ( June 14, 2018 )

b.

Rename the default WordPress posts ( Knowledge Base )

To rename the default WordPress posts put this into your functions.php file. ( April 19, 2018 )

c.

Disable the archive label in the default WordPress title function ( Knowledge Base )

I like to embrace the system with which we build our websites and display things like this with no alteration... But try getting a job with that attitude!! ( March 19, 2018 )

d.

Create a matching term in a taxonomy when publishing a custom post ( Knowledge Base )

Recently I built a site that needed to have terms that matched the name of every custom post type 'brand'. ( February 16, 2018 )

e.

How to disable the default WordPress categories ( Knowledge Base )

You need to register the taxonomy ‘category’ again with no arguments. You can do this by adding the below snippet ( December 18, 2017 )

f.

Create an archive page of all the media on your WordPress site. ( Knowledge Base )

As I had partitioned all of my work into posts I wanted somewhere I could view the images only and then click through to the post with which the image was associated with if the image piqued my interest. ( November 25, 2017 )

g.

Stop users adding terms to a taxonomy ( Knowledge Base )

I used this to stop anyone adding terms to a taxonomy that we needed to be set to a set of specific terms. Once they were added to the databases across all environments the below was added to the functions file. ( October 17, 2017 )

h.

“Disable” a WordPress post type archive page ( Knowledge Base )

We will not actually disable the page. As far as I can tell these cannot be disabled (please do let me know if they can). We will redirect it to the home page. Good practice, no, good for the user, no, time saving, yes. Please! If anyone has any ideas that would make this nicer please share. ( October 16, 2017 )

i.

A vanilla JS structure for hover states on more than one element ( Knowledge Base )

If you want to do some crazy hover effects using javascript on multiple elements on a page then use this structure. This technique is useful if you want to use something from the mousemove event, like the mouse position. ( September 25, 2017 )

j.

Adding inline SVGs in WordPress ( Knowledge Base )

Finding the best way to include SVG files in Wordpress can be a little confusing. There doesn't seem to be a clear answer anywhere. ( September 19, 2017 )

k.

Using a direct SQL query in place of the wp_query loop ( Knowledge Base )

This means it isn't running through all the Wordpress functions that are not relevant to our particular scenario thus increasing the speed of the query drastically. ( August 17, 2017 )

l.

Correctly setting a different number of posts per page on a WordPress archive page ( Knowledge Base )

I found out recently that you should not be using a custom WP_Query on an archive page if you don't want to cause major issues with your pagination. However, for this particular Custom Post Type archive page I needed to set a different number of posts per page than was set in the admin settings for the blog page. ( July 30, 2017 )

m.

Writing an admin notice after saving a post in WordPress ( Knowledge Base )

I recently had to write an alert to a user after the saving of an ACF options page. I did so by using the Wordpress admin_notices action. ( July 11, 2017 )

n.

Getting Google Maps API’s to work with Advanced Custom Fields ( Knowledge Base )

Google map embeds have recently become a massive pain in the butt. You need api keys to embed them, which is fine but the documentation is seriously disjointed and overly complicated. ( January 24, 2017 )

o.

Add a fade transition to Flickity ( Knowledge Base )

This is a hack and it should be noted that if you want a fading slider then you should search for one that has this built in. ( September 28, 2016 )

p.

Use Applescript to open a list of URL’s in Google Chrome ( Knowledge Base )

This Applescript can be used in Mac's Automator application to receive a list of urls and open them all in new tabs in Google Chrome. ( March 29, 2016 )

q.

Get the Featured Image URL in WordPress ( Knowledge Base )

I looked for an elegant way to find the URL of a specific size of the Featured Image in Wordpress for a while. This is a nice way. ( February 15, 2016 )

r.

Setting up .htaccess URL Redirects in WordPress ( Knowledge Base )

The correct way to setup redirects within the Wordpress .htaccess file is to put your redirects above the Wordpress pretty permalinks code. ( January 27, 2016 )

s.

Scheduling a category change, based on an Advanced Custom Field value, when a post is saved using a WordPress CRON job ( Knowledge Base )

In a nutshell we needed to change an individual post's category on a given date (via an ACF field) sometime in the future. ( January 6, 2016 )

t.

Open a list of URL’s in Google Chrome using Mac Automator ( Knowledge Base )

This is a relatively simple task but important for us to begin automating some of the more dreary tasks we have to complete in the studio. ( )

u.

A comprehensive argument list for WP Query ( Knowledge Base )

https://gist.github.com/luetkemj/2023628 ( November 18, 2015 )

v.

A list of the default settings for flexslider ( Knowledge Base )

The documentation does not have all of these listed (as far as I can tell) but here they are pulled straight from the code. ( August 27, 2015 )

w.

Add custom image sizes to the WordPress media upload image size menu ( Knowledge Base )

When adding a custom image size in your Wordpress functions file using add_image_size() it is not automatically added to your media upload image size dropdown menu. ( August 15, 2015 )

x.

Stop a function that has been started with javascript’s setTimeout() function ( Knowledge Base )

I created a scroll animation that I wanted to happen 3 seconds after the page had loaded. ( June 30, 2015 )

y.

Test if a user has interacted with your page using jquery ( Knowledge Base )

Here is some simple jQuery to test if a user has scrolled or clicked on your page. ( )

z.

Useful SSH commands for working with public/private keys ( Knowledge Base )

Below are a list of some useful commands for working with public/private keys on a server over ssh. ( June 26, 2015 )

aa.

Find the src of a particlular size of the WordPress post thumbnail ( Knowledge Base )

I now often need to use srcset to provide a list of possible images for the browser to choose from I need to find the urls of various sizes of the Featured Image. ( May 19, 2015 )

ab.

Passing variables to a template part in WordPress ( Knowledge Base )

I then wanted to access the $count variable that I had attached to my Wordpress loop within that template. ( )

ac.

Rename a local and remote branch in git ( Knowledge Base )

If you have named a branch incorrectly AND pushed this to the remote repository follow these steps before any other developers get a chance to jump on you and give you shit for not correctly following naming conventions. ( February 5, 2015 )

ad.

Adding just the Bootstrap grid using less ( Knowledge Base )

Sometimes we want to use only the Bootstrap grid in a project and not everything else. ( January 26, 2015 )