最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugin development - How will i add an option under customizer the event calendar section?

programmeradmin1浏览0评论

What is the customizer section name? I want to add a field option under customizer The Event Calendar section. Or how will I add a field under The Event Calendar option? Can someone help me with that?

`$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',
    ) ) );`

What is the customizer section name? I want to add a field option under customizer The Event Calendar section. Or how will I add a field under The Event Calendar option? Can someone help me with that?

`$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',
    ) ) );`
Share Improve this question edited Apr 14, 2019 at 3:54 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Apr 13, 2019 at 22:51 Sumon HasanSumon Hasan 1033 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

While in the Customizer preview, right-click on The Events Calendar section and inspect it, you'll get it's id.
As an example, if you right click on Site Identity section and inspect it, you'll have at the beginning the following :

<li id="accordion-section-title_tagline"...

So, the id IS ONLY title_tagline
Hope this helps

发布评论

评论列表(0)

  1. 暂无评论