If you want to programmatically insert a post in the front end, for example based on user input, there is a danger that the user can resubmit the form and post it twice. WordPress has the function post_exists to prevent that. But it is an admin function and if you try using it in the […]
What a pain in the neck! I tried Mailhog and just couldn’t it working on my M1 Mac Mini, so I’ve gone down the Postfix route and got it working and diverting all emails to one email address. You are going to be using the Terminal (which is in Applications > Utilities) Open that up […]
If you need to send a post or page out via email, you will need to parse blocks and shortcodes first. I use MailChimp and the API doesn’t like audio and video tags. This function takes the post content and parses it creating buttons for playing audio and video. In the switch($block[‘blockName’]) you can add […]
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…