Recently, I've been attempting to integrate a javascript gallery into my WordPress site. However, I'm encountering some confusion regarding what needs to be included in the .ready(function) to successfully run the gallery. The original jQuery function page can be found here:
It seems like I need to execute a certain function that will trigger the entire javascript file, but I am unsure about which function specifically. Apologies for my lack of experience in this area, and thank you in advance for any assistance!
function malihu_gallery() {
if (!is_admin()) {
// Enqueue Malihu Gallery JavaScript
wp_register_script('malihu-jquery-image-gallery', get_template_directory_uri(). '/js/malihu-jquery-image-gallery.js', array('jquery'), 1.0, true );
wp_enqueue_script('malihu-jquery-image-gallery');
// Enqueue Malihu Gallery Stylesheet
wp_register_style( 'malihu-style', get_template_directory_uri() . '/CSS/malihu_gallery.css', 'all' );
wp_enqueue_style('malihu-style' );
function gallery_settings () { ?>
<script type="text/javascript">
jQuery(document).ready(function() {
// What should I include here?
});
</script><?php
}
}
}
add_action('init', 'malihu_gallery');