Add to existing customizer control via plugin
-
I’m working on a plugin to go with a theme.
I’ve tried various options and searched the net with no luck.The theme has several options in the customizer, one is selecting (dropdown) a blog layout choice. However, I’ve been trying to code a plugin to add “more” blog layouts to the current array of 3 options.
// Blog Layout $wp_customize->add_setting( 'tester_blog_layout', array( 'default' => 'classic', 'sanitize_callback' => 'tester_sanitize_select', )); $wp_customize->add_control( new Tester_Select_Control( $wp_customize, 'tester_blog_layout', array( 'label' => esc_html__( 'Blog Layout', 'tester' ), 'section' => 'tester_layout_settings', 'choices' => array( 'classic' => esc_html__( 'Classic Right Sidebar', 'tester' ), 'classic-left' => esc_html__( 'Classic Left Sidebar', 'tester' ), 'center' => esc_html__( 'Centered', 'tester' ), ))) );
I cannot find any info on how this is done. Does anyone have a solution for this?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add to existing customizer control via plugin’ is closed to new replies.