Site icon Hip-Hop Website Design and Development

What’s the technique to modify to particular web page on getting into theme customizer display?

On getting into the theme customizer, it defaults to the set residence web page, nevertheless I want to alter the default to a web page with ID 45.

The set residence web page makes use of a particular template and is formatted by the elementor plugin so it isn’t anticipated to answer the theme customizations. The web page ID 45 makes use of the first theme and isn’t set for public show, however solely for the aim of previewing the adjustments.

I attempted the next with out success

add_action('customize_register', operate($mgr) 
{
  add_action('customize_controls_print_scripts', operate() 
  {
    echo '
    <script>
    wp.customise.previewer.previewUrl.set(wp.customise.settings.url + "?page_id=45");
    </script>
    ';
  }
}

The console error states can not learn property of previewUrl however I’m stumped on resolving the errors. I reviewed the customizer js api at https://developer.wordpress.org/themes/customize-api/the-customizer-javascript-api/ however simply can not decide the right course of.