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”

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”

Render Conference 2017

Render Conference 2017

I’ve been attending Render Conference since it’s first run out as JQuery Conference  back in 2012.

It always has a great range of speakers and topics, and is brilliantly organised and run. Plus, it’s a chance to get my geek on with a whole load of other developers just down the road in Oxford, what’s not to love.

I always come away feeling inspired to try something new, or look at a different technique that might be an improvement on the way I have previously implemented a solution.

This year was no different. Continue reading “Render Conference 2017”

Developer // Removing Sub Page Menu Item In WordPress Whilst Still Allowing Page Access

Had an error in from a website where the admin couldn’t gain access to edit registrations in WordPress backend. Receiving the following “you are not allowed access” error:

wordpress access error

On closer inspection to the code it appeared in trying to hide the ‘Add New’ option for the post type from the admin menu, the developer had inadvertently removed access to the registration form page. Continue reading “Developer // Removing Sub Page Menu Item In WordPress Whilst Still Allowing Page Access”

Developer // Adding Categories and Tags Functionality To WordPress Custom Post Types

Had a request from a client to add categories and tags to their resources custom post type in WordPress.

Obviously I assumed there were predefined WP functions to implement this, but I found it hard to pin down a complete solution, so thought I would share mine here. Continue reading “Developer // Adding Categories and Tags Functionality To WordPress Custom Post Types”

Developer // Embedding Videos Responsively

Having to add embedding Vimeo videos support to a WordPress backend I came across the inevitable “how to handle mobile” issue.

After a quick search I found this lifesaver of a website – Which very simply generates responsive embed code for a host of different media sources, including Vimeo, YouTube, Dailymotion and Instagram. Continue reading “Developer // Embedding Videos Responsively”

Code: Debugging The Gender Gap

As today is International Women’s Day there’s no better day to write about the screening of the documentary “Code: Debugging The Gender Gap” I went to last week.

Being a female developer, the sole female developer in a team  of  10 where I work, i’d been wanting to see the film, directed and produced by Robin Hauser Reynolds, since it was released – so when White October organised a screening in Oxford I was there.

Continue reading “Code: Debugging The Gender Gap”