Kick off reload of customizer preview from the preview

In my Photographus theme, I needed to reload the customizer preview from the preview in a specific case. After searching for a short while, I found the post »Implementing Selective Refresh in the Customizer« by Weston Ruter.

The problem is solved with the following JS line:

wp.customize.preview.send('refresh');Code language: JavaScript (javascript)

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)