Adding javascript functions to Laravel Mix ( and why you get error Uncaught ReferenceError: function is not defined )

This one had me pulling my hair out the other day. I was using Laravel,  adding a javascript function to the app.js file ( also tried using require in app.js and pulling in my function ). Laravel uses Laravel Mix which is a wrapper for webpack. Yet with either approach I was getting the javascript … Read more

How to add a form to a shortcode in WordPress (using PHP and Ajax)

Recently I needed to develop a Shortcode that would display a form, this blog post details what I did. I used Ajax ( which seems the best way to add forms to shortcodes, but I’d welcome any input from other developers on your approach). So without further ado lets get on with adding a form to … Read more