定制程序部分的名称是什么?我想在定制程序woocommerce部分下添加一个字段选项。或者如何在woocommerce选项下添加字段?有人可以帮我吗?
$wp_customize->add_section( 'woocommerce_secction_name' , array(
'title' => __( 'My Section Name', 'starter' ), 'priority' => 30
) );
$wp_customize->add_setting( 'starter_new_setting_name' , array(
'default' => '#000000', 'transport' => 'refresh', ) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array(
'label' => __( 'Header Color', 'starter' ), 'section' => 'woocommerce_secction_name', 'settings' => 'starter_new_setting_name', ) ) );
#1
// Add section to WooCommerce Panel
$wp_customize->add_section( 'SECTION_NAME', array(
'title' => __( 'SECTION TITLE'), 'panel' => 'woocommerce', 'capability' => '', 'priority' => 500, )
);
重要的是面板名称, 如你所见, 选择woocommerce它将添加到woocomerce面板中
评论前必须登录!
注册