禁用wordpress子主题中的函数
如何禁用禁用wordpress子主题中的函数,wordpress,Wordpress,如何禁用 add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); 在wordpress父主题的functions.php中是否从子主题开始? 请帮忙 这将删除子主题函数中的支持和使用。phpif Child-Theme-activate,否
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
在wordpress父主题的functions.php中是否从子主题开始?
请帮忙 这将删除子主题函数中的支持和使用。phpif Child-Theme-activate,否则放入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' );
}
?>