CodePen

New Pen
User Avatar of Geoff Yuen

Geoff Yuen

Canada For Hire

Do you Grunt and make Wordpress themes?

Ever wanted to refresh your Wordpress page when you hit save or update? If you're using Grunt to livereload your .php files try adding this to your functions.php:

function livereload() {
    touch( get_template_directory() . '/livereload.php');