Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
禁用wordpress子主题中的函数_Wordpress - Fatal编程技术网

禁用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' );
}
?>