Gilbert Pellegrom

Gilbert Pellegrom

Software Engineer and Web Developer from Scotland

Path Copy 2 Created with Sketch.

AJAX in WordPress Themes

Posted on

For some reason, it seems really hard to find a nice, simple, copy-and-paste-able resource for explaining how to do AJAX requests in WordPress themes the-right-way™. So here it is. Backend Let’s add the function that will return the AJAX response from the backend. This is normally added to the theme functions.php file: Notes: We need…

2019 Year In Review

Posted on

As has been my custom for the past nine years, I like to spend a bit of time at the end of the year reflecting on the year that has been, looking ahead to the year that is to come, and noting down these reflections for posterity. Professionally This year was an unexciting but productive…

Yo! Podcast

Posted on

This week Rob Hope was kind enough to invite me on to the Yo! Podcast to chat about the Nivo Slider, side projects, online tracking, productivity and Biffy Clyro (of course). If you have a spare 30 mins go and have a listen and let me know what you think on Twitter. If you enjoy…

Grace

Posted on

I’m delighted to be able to announce that on the 6th of August 2019, at exactly 8 pm, Grace Catherine Pellegrom came into the world weighing exactly 7lbs 🎉 To say we’re thrilled is an understatement. I mean just look at her! I know I’m totally biased but isn’t she just the most beautiful thing…

Redesign and Rebuild

Posted on

Since moving back to WordPress I’ve been wanting to improve the design of this site to make it feel a bit less bland and bring it more in line with modern sites in terms of technology. My biggest gripe, in terms of design, was that the homepage was just a bunch of text and very…

Expecting Again

Posted on

We’re thrilled to be able to announce that my wife and I are expecting again! Another wee bundle of joy is due to arrive in August 2019. We are so thankful to God for Joshua and the amazing wee boy he has become, and we’re just as thankful to Him for blessing us with a…

Moving Back to WordPress

Posted on

It’s been some time since this blog ran on WordPress. I can’t remember when exactly, but some time ago I moved this blog to Medium for the convenience of not having to manage a site and the free exposure offered by Medium’s network. However, these days hosting your own content is in vogue again and…

2018 Year in Review

Posted on

As has been my custom for the past eight years, I like to spend a bit of time at the end of the year reflecting on the year that has been, looking ahead to the year that is to come, and noting down these reflections for posterity. Professionally Since selling my WordPress business at the…

Coming Around to Utility First CSS

Posted on

This week I’ve been playing with Tailwind, which is a “Utility-First CSS Framework for Rapid UI Development”. At first I was skeptical of the benefits of “utility-first” CSS but I’m pleased to say that after using Bootstrap 4 for a while (which contains some utility classes) and Tailwind for a week I’m convinced that utility-first…

Custom Validation Attributes in Laravel

Posted on

Recently, I was working on some Laravel validation that used the array syntax to validate fields. For example: However, in this case the error message that is returned looks like this: Not ideal. The Laravel docs cover how to customize the error messages for rules but not for the attribute names themselves. It turns out…