Answer the question
In order to leave comments, you need to log in
Why might the baguetteBox not work?
Good day!
In the WP theme, you need to connect the baguetteBox
In the functions.php file, you connect to the baguetteBox:
function flowers_scripts() {
wp_enqueue_style( 'flowers-style', get_stylesheet_uri(), array(), _S_VERSION );
wp_enqueue_style( 'flowers-bootstrap-css', get_template_directory_uri().'/assets/bootstrap/css/bootstrap.min.css', array(), _S_VERSION );
wp_enqueue_style( 'flowers-googlefonts-css', 'https://fonts.googleapis.com/css2?family=Montserrat:[email protected];500&family=Nunito+Sans&display=swap', array(), _S_VERSION );
wp_enqueue_style( 'flowers-baguetteBox-css', get_template_directory_uri().'/assets/css/baguetteBox.min.css', array(), _S_VERSION );
wp_enqueue_style( 'flowers-style-css', get_template_directory_uri().'/assets/css/style.css', array(), _S_VERSION );
wp_deregister_script('jquery');
wp_register_script('jquery',get_template_directory_uri().'/assets/js/jquery-3.5.1.min.js');
wp_enqueue_script('jquery');
wp_enqueue_script( 'flowers-popper-js', get_template_directory_uri() . '/assets/js/popper.min.js', array(), '', true );
wp_enqueue_script( 'flowers-bootstrap-js', get_template_directory_uri() . '/assets/bootstrap/js/bootstrap.min.js', array(), '', true );
wp_enqueue_script( 'flowers-baguetteBox-js', get_template_directory_uri() . '/assets/js/baguetteBox.min.js', array(), '', true );
wp_enqueue_script( 'flowers-main-js', get_template_directory_uri() . '/assets/js/main.js', array(), '', true );
wp_enqueue_script( 'flowers-fontawesome-js', 'https://kit.fontawesome.com/7b292b2c1c.js', array(), '', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'flowers_scripts' );
jQuery(function($){
$(document).ready(function () {
baguetteBox.run('.wp-block-gallery');
});
Answer the question
In order to leave comments, you need to log in
Look for classes or identifiers that can affect it. Perhaps one of them in css breaks his work
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question