admin管理员组

文章数量:1425691

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

I have run the following code within my functions.php, however Lightbox, Zoom and the Slider ALL do not work. The CSS seems to load for the Swipe, however no javascript files are being loaded.

I have no errors, so what could be the issue? Is it involving the function code itself?

Running latest WooCommerce (v3.6.3) and latest Wordpress (v5.2)

function fd_theme_support() {
    add_theme_support( 'woocommerce' );
    add_theme_support( 'wc-product-gallery-zoom' );
    add_theme_support( 'wc-product-gallery-lightbox' );
    add_theme_support( 'wc-product-gallery-slider' );
    add_theme_support( 'custom-logo', array(
        'height'      => 100,
        'width'       => 400,
        'flex-height' => true,
        'flex-width'  => true,
        'header-text' => array( 'site-title', 'site-description' ),
    ) );
}
add_action( 'after_setup_theme', 'fd_theme_support', 10 );

I am also using Bootstrap 4 as the framework for my website...could that be interrupting the function's processes at all?

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

I have run the following code within my functions.php, however Lightbox, Zoom and the Slider ALL do not work. The CSS seems to load for the Swipe, however no javascript files are being loaded.

I have no errors, so what could be the issue? Is it involving the function code itself?

Running latest WooCommerce (v3.6.3) and latest Wordpress (v5.2)

function fd_theme_support() {
    add_theme_support( 'woocommerce' );
    add_theme_support( 'wc-product-gallery-zoom' );
    add_theme_support( 'wc-product-gallery-lightbox' );
    add_theme_support( 'wc-product-gallery-slider' );
    add_theme_support( 'custom-logo', array(
        'height'      => 100,
        'width'       => 400,
        'flex-height' => true,
        'flex-width'  => true,
        'header-text' => array( 'site-title', 'site-description' ),
    ) );
}
add_action( 'after_setup_theme', 'fd_theme_support', 10 );

I am also using Bootstrap 4 as the framework for my website...could that be interrupting the function's processes at all?

Share Improve this question edited Jun 8, 2019 at 3:41 Anake.me asked May 21, 2019 at 8:18 Anake.meAnake.me 2462 silver badges11 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Incase anyone else may run into a similar issue, the problem I was having was that I hadn't added the <?php wp_footer(); ?> code into my footer.php file.

If it is not added, anything that you intent to load via the footer will not work! Took me a few weeks to figure out that one line of code was breaking my workflow...

本文标签: woocommerce offtopicWC LightboxZoom and Slider not loading