Javascript – detect what type of mobile

  |   By  |  0 Comments

For one of my apps, I have a landing page website – ourchurchapp.online, that detects if a mobile phone or tablet has accessed it and redirects to the correct app store. I use a javascript function to detect iOS, Android, Windows and Amazon – although Windows doesn’t go anywhere – so few people use it […]

Continue reading...

Preparing Gutenberg blocks for an email

  |   By  |  0 Comments

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 […]

Continue reading...

Weird characters appearing on WordPress posts

  |   By  |  0 Comments

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 = ” […]

Continue reading...

Finding bad code in a WordPress Install

  |   By  |  0 Comments

A premium WordPress plugin client was having some trouble with their site. Some of my Javascript had stopped working because of a javascript error from another plugin/theme. Unfortunately their javascript wasn’t enqueued and I was struggling to find how it had got there. I only had site access and no FTP or shell to search. […]

Continue reading...

Posting a WordPress shortcode without it being processed

  |   By  |  0 Comments

I often want to show a shortcode in a tutorial post without it actually processing the shortcode. For example Name EmailContact NumberSubjectMessageThis contact form only works with Javascript enabled In the old classic editor, you could switch to Text and use the html entities [ becomes [ ] becomes ] so you could use [contact_form] […]

Continue reading...