Hello,
I am new to SiteOrigin and I need to improve a site that contains a custom widget.
This widget displays in a pop-up a 360° image after clicking on the thumbnail.
The widget is created in its folder which is located in the plugins but there is also a page with a piece of Javascript / JQuery code which is located in the site pages.
I would like to remove this page and not have it in the list of pages of the site and that the script is used directly in the widget.
Do you have any idea about this problem?
I attach the script in question
Thanks
$(document).ready(function(){
var viewer = PhotoSphereViewer({
container: 'vue360',
panorama: '',
default_fov: 90,
mousewheel: false,
navbar: false,
size: { width: $(window).width(), height: $(window).height() },
});
})
Problem with a custom widget
This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.
Hi Maxime
Thanks for getting in touch.
If the widget is built on the SiteOrigin Widgets Bundle Framework, please see https://github.com/siteorigin/docs/blob/develop/widgets-bundle/advanced-concepts/actions/enqueue-frontend-scripts.md.
If you aren’t using the SiteOrigin Widgets Bundle Framework for your custom widget, you can check https://developer.wordpress.org/reference/functions/wp_enqueue_script/.
Hi Andrew,
Thanks for your help.
I will read all this and try to solve this problem
Hi Maxime
For sure. Let us know how you get on.
Cheers
Andrew