Rohan
Rohan

Reputation: 21

Disabling function in wordpress child theme

How to disable ;

add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );       

in wordpress parent theme's functions.php from the child theme ? Please help!

Upvotes: 0

Views: 220

Answers (1)

Arpan Sagar
Arpan Sagar

Reputation: 164

This will remove support and Use in your Child Theme's functions.php(if child theme activate otherwise put in parent theme function.php)

<?php
add_action( 'after_setup_theme', 'remove_featured_images_from_child_theme', 11 ); 

function remove_featured_images_from_child_theme() {

    // This will remove support
    remove_theme_support( 'wc-product-gallery-zoom' );
    remove_theme_support( 'wc-product-gallery-lightbox' );
    remove_theme_support( 'wc-product-gallery-slider' );
}
?>

Upvotes: 1

Related Questions