Php 如何在WooCommerce中的产品设置选项下创建额外的设置选项?
Php 如何在WooCommerce中的产品设置选项下创建额外的设置选项?,php,wordpress,woocommerce,Php,Wordpress,Woocommerce,将此代码添加到wordpress主题中的functions.php文件中。我已经尝试了此官方教程,但他们没有解释在何处添加此代码、在哪个文件中以及如何调用它?我想把它添加到WordPress的核心结构中,而不是任何主题中。因此,它将独立于任何主题。 <?php /** * Create the section beneath the products tab **/ add_filter( 'woocommerce_get_sections_products', 'wcslider_a
将此代码添加到wordpress主题中的functions.php
文件中。我已经尝试了此官方教程,但他们没有解释在何处添加此代码、在哪个文件中以及如何调用它?我想把它添加到WordPress的核心结构中,而不是任何主题中。因此,它将独立于任何主题。
<?php
/**
* Create the section beneath the products tab
**/
add_filter( 'woocommerce_get_sections_products', 'wcslider_add_section' );
function wcslider_add_section( $sections )
{
$sections['wcslider'] = __( 'WC Slider', 'text-domain' );
return $sections;
}