0
の簡単な質問。WordPressカスタマイザの複数のadd_controlのセクション
WordPressカスタマイザセクションに複数のコントロールを追加しようとしています。
$wp_customize->add_section('lr_panel2', array(
'title' => esc_html__('Panel 2', 'lr'),
'active_callback' => 'is_front_page',
'panel' => 'lr_theme_options',
'description' => esc_html__('Add a background image to your panel by setting a featured image in the page editor. If you don’t select a page, this panel will not be displayed.', 'lr'),
));
$wp_customize->add_setting('lr_panel2', array(
'default' => false,
'sanitize_callback' => 'lr_sanitize_numeric_value',
));
$wp_customize->add_control('lr_panel2', array(
'label' => esc_html__('Panel Content', 'lr'),
'section' => 'lr_panel2',
'type' => 'dropdown-pages',
));
だから、これはうまく機能しています。私は2番目のものを追加しようとし、どちらもレンダリングしません。
$wp_customize->add_control('lodestar_panel2', array(
'label' => esc_html__('Panel Layout', 'lr'),
'section' => 'lr',
'type' => 'select',
'choices' => array(
),
));
しかし、それは、私はそれがあまりにも、誰もがこの前に行っているしたいどのように動作していないです:私は何かのように、私はちょうどadd_controlクラスを繰り返す可能性が想定さ?
ありがとうございます!