If you want tables in the admin area of your plugin to be responsive, here’s the basic markup… The is-expanded class is added by the WordPress API when the downward arrow button is clicked.
If weird characters suddenly appear on your blog posts and pages. Don’t panic. You may see Donâ€™t instead of Don’t for instance. This can happen when a database is restored or updated because the character set has been changed Here are some common examples… â€œ = left quote = “â€ = right quote = ” […]
If you want to follow MAMP error logs in the terminal, this the command To clear the log use this command
I have discovered that the MailChimp API is pretty awful at handling audio tags when sending an email – It’ll come through looking like a playable audio player but nothing works in my email client! So I created a code snippet to turn an audio tag into a Play Audio link button…
I have recently updated my Never Loose Contact form plugin for WordPress websites. I originally wrote it because I wanted a simple Spam proof contact form that saved the messages to a database, in case the emails went AWOL. In it’s first few iterations it blocked contact form messages with more than 2 hyperlinks in […]
While updating a WordPress plugin recently I wanted to enable the block editor for a custom post type. Strangely, it is not automatic.After a quick Google, I discovered I needed to add ‘show_in_rest’=>true and ‘supports’=>array(‘editor’) to the arguments for the register_post_type function. All well and good, but no title field appears at the top of […]
I got an error on a booking system for a conference I was trying to book into this week. I happen to live in a town that has an apostrophe in the name and it crashed the booking system and worse gave the query in the error on screen. OopsThe error message made it clear […]
After a recent upgrade, some of my MySQL queries stopped working – where it was a DATE column with a default already set to 0000-00-00. That’s not allowed for MySQL v5.7.11 and above. Not simple to change because the error keeps occuring. Here’s how I got round it UPDATE table SET column= “1000-01-01” WHERE column<“1000-01-01”; […]