我将如何在定制器的活动日历部分下添加选项?

时间:2019-04-13 作者:Sumon Hasan

enter image description here

自定义程序节的名称是什么?我想在customizer事件日历部分下添加一个字段选项。或者如何在事件日历选项下添加字段?有人能帮我吗?

`$wp_customize->add_section( \'the_event_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\'  => \'the_event_secction_name\',
        \'settings\' => \'starter_new_setting_name\',
    ) ) );`

1 个回复
SO网友:LebCit

在自定义程序预览中,右键单击The Events Calendar 然后检查它,你会得到id.
例如,如果右键单击Site Identity 并对其进行检查,您将在开始时看到以下内容:

<li id="accordion-section-title_tagline"...
所以id IS ONLY title_tagline<希望这有帮助

相关推荐