Category: Notes

Who needs Evernote? I’m sharing any useful notes and links I find in this section. (For any code, notes or links relating to web development, see the Code section instead).

  • Mobile menu not loading till after first user interaction on Mai Engine powered theme with WP Rocket

    Solution was to disable ‘Delay JavaScript execution’ under WP Rocket > Settings > File Optimization then clear the WP Rocket (and Cloudflare) caches.

    (Trying to exclude the Mai Engine files via the ‘Excluded JavaScript Files’ option under ‘Delay JavaScript execution’ with /wp-content/plugins/mai-engine/assets/js/min/(.*).min.js and similar didn’t work).

  • Google font not loading / broken after Pagely clone using a Mai Engine powered WordPress theme

    Not sure exactly where the fault lied, but the issue was the font was pointing to instead of

    Running pagely-wp search-replace /dom12345/wp-content/fonts/ /wp-content/fonts/ was enough to solve it.

  • Get true or false from ACF field without using get_field()

    $is_enabled = (bool) get_post_meta( get_the_ID(), 'meta_key', true );
  • Add http basic auth to Pagely website

    http basic auth is handy when you want to add a username and password to stop anyone (including web crawlers) from accessing a website you’re working on, like a staging or development website.

    To add http basic auth in Pagely, go to to the Pagely Dashboard (, go to Apps and choose the site you want to add http basic auth to.

    From there, choose the ARES tab and choose New Access Rule. Set the options you want – including the username and password – hit Save and then choose Deploy Changes.

    Anyone accessing the website in future will need to enter the username and password to proceed.

    Tip: if you’re on a Mac, you can save the username and password in Safari to save you having to re-enter it in future.

  • Run WP-CLI commands on Pagely without errors from PHP version

    I hit an issue on Pagely where I was running a WP-CLI command – via SSH – but I kept hitting a PHP fatal error.

    When I looked into the error it was because the site was running PHP 7.4, but WP-CLI on Pagely was running PHP 7.3 so my code was breaking on the command line.

    Turns out all you need to do is use pagely-wp instead of wp (thanks Kevin!) and the command will run at the correct version of PHP.

    So instead of:

    wp search-replace


    pagely-wp search-replace