Upgrade to WordPress 5.5

In general my upgrade to WordPress 5.5 has been pretty seamless, across all of the client sites that I maintain.  This is good news! One of the main issues that I’ve come across is with a few of the sites running older themes (despite my recommendations to let me update or create a custom theme…

Sending HTML emails in WordPress

Sounds simple, but WordPress defaults to text emails, so if you want to send pretty HTML ones, then you need to let it know. Previously I have done this in a bit of a convoluted way… add_filter(‘wp_mail_content_type’,’set_html_mail_content_type’); wp_mail($to_address, $subject, $message); remove_filter(‘wp_mail_content_type’,’set_html_mail_content_type’); This relies on this function to work… function set_html_mail_content_type() { return ‘text/html’; } You…

Updating WordPress post metadata

I was fighting with a WordPress issue earlier today, and the solution turned out to be pretty simple, and a clear case of me not reading the WordPress developer resources properly. The situation arose because I was updating a number of post metadata fields and trying to count the number of edits, like this… $count…