Developer // Accessing WordPress URL Function Values Within Javascript

During my custom WordPress theme development I often find that it would be really useful if I could just use the WordPress get_template_directory_uri() or home_url() functions from within Javascript.

For example when trying to set the url of an Ajax request in jQuery, or setting the path to an icon image file on a Google Map.

Thankfully, if you’re using WordPress in the way it’s intended, there is a very simple way to make this possible. Continue reading “Developer // Accessing WordPress URL Function Values Within Javascript”

Type With Pride

gilbert

Gilbert Baker, the creator of the Rainbow Flag so strongly associated with the LGBTQ community, died in March of this year.

In his memory NewFest and NYCPride created a free font, with Fontself, named ‘Gilbert’, taking inspiration from the iconic flag colours as a way of honouring him. Continue reading “Type With Pride”

Developer // ACF: Counting Repeater Rows Inside Flexible Content

So I was trying to count the number of repeater rows for a ACF repeater field in my WordPress theme, something which I figured would be a simple use of the count() function on the returned field.

In turns out though, that the following code doesn’t work with a repeater field if it is part of a flexible content block. Continue reading “Developer // ACF: Counting Repeater Rows Inside Flexible Content”

The Art of the Brick DC Super Heroes Exhibition, London

Back in March I went to The Art of the Brick DC Super Heroes Exhibition in London. This is the largest collection of super hero lego artwork, using nearly 2,000,000 bricks, and covering all the favourites – from Superman to Harley Quinn.

All the work of artist Nathan Sawaya, each piece had a little info plaque stating how many bricks were used to create it, and it became quite the game to try and guess the correct amount before looking each time. Continue reading “The Art of the Brick DC Super Heroes Exhibition, London”