For the last ten years, I’ve been blogging metal, punk, hardcore and rock music reviews at 195metalcds.com.
Besides the main list of reviews, I also created three pages to list the reviews by artist, genre and score. I updated these manually because when I started the blog I hosted it at wordpress.com which had limitations about which themes and plugins I could use. But ever since moving the site to my own paid-hosting account at SiteGround, I’ve wanted to write a plugin or child theme function that could update these three pages automatically. Well, now I have and that’s what this blog post explains.
Just over 48 hours ago I updated the DNS settings and initiated the switch to the new server. Other than a slightly misconfigured Cloudflare CDN everything has gone smoothly. This is in part due to my experience of having done this a couple of times now, and in part due to the excellent and clear controls that SiteGround offers behind the scenes.
In the end it was deceptively simple. I’d set the priority values for the add_action($hook, $function_to_add, $priority) and remove_action($hook, $function_to_add, $priority) functions too low.
WordPress uses the priority value to determine in which order particular actions are run. The default value is 10. The higher the value, the later it will be executed.
While I was investigating this, it crossed my mind that it would be really useful if I could write values to the Google Chrome console in the same way that you can when writing and debugging JavaScript.
With the Chrome Logger extension installed and enabled on the tab I wanted to write to, all I had to do was include the library and log some data. Like this:
<?php
include 'ChromePhp.php';
ChromePhp::log('Hello console!');
ChromePhp::log($_SERVER);
ChromePhp::warn('something went wrong!');
?>
Very useful. And as well as a library for PHP there are also libraries for
Pittenweem Properties: self-catering in the East Neuk of Fife
Over the last few months in the evenings and at weekends, I’ve been working on redesigning the Pittenweem Properties website for friends here in Anstruther. The site launched a couple of weeks ago.
Pittenweem Properties offers high-quality self-catered holiday accommodation and property management services in and around Pittenweem. They currently manage properties in Carnbee just outside Anstruther and Pittenweem. But their portfolio is growing and for good reason — the properties they own and manage are to a very high standard and in a beautiful part of Scotland: the East Neuk of Fife.
WP Booking System
The site was quite fun to build.
We used Trello for communication and project planning, WordPress (of course!) as the content management system, and the Divi theme from Elegant Themes which allowed me to very quickly design and build the site. I also changed the built-in projects custom-post-type to properties using the method I blogged about in March: changing the Divi projects custom post type to anything you want.
For the booking calendar we turned to a premium theme: WP Booking System which we found intuitive and offered most of the features we needed:
Multiple booking calendars.
Submit booking requests via form.
Display anywhere (on page or within widgets) using a shortcode.
Customisable display features, including splitable legend for check-in and check-out).
If this plugin had also allowed online payments, say via PayPal, then it would have been absolutely perfect but as it is we’ve been really happy with the functionality and usability of this plugin.
There is a free version of the plugin, but it offers only one calendar and has customisation limitations. The premium version costs only US $34 (approx. GBP £21.50).
Next…
While the site is now live there are still a few bits and pieces to do, such as keep an eye on analytics data and try to improve search engine rankings.
Websites are never really finished, are they?
It was a fun project to work on. Time to focus on optimising family finances and admin, and cracking on with writing my book.
I use analytics cookies (Microsoft Clarity) to understand how the site is used and improve content.