first commit
This commit is contained in:
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
|
||||
function example_customizer( $wp_customize ) {
|
||||
|
||||
|
||||
/* ============== HEADER LOGO
|
||||
========================== */
|
||||
$wp_customize->add_section( 'logo_section' , array(
|
||||
'title' => __( 'Logo' ),
|
||||
'priority' => 30,
|
||||
'description' => 'Upload a logo in the header',
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'logo' );
|
||||
|
||||
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'logo', array(
|
||||
'label' => __( 'Logo' ),
|
||||
'section' => 'logo_section',
|
||||
'settings' => 'logo',
|
||||
) ) );
|
||||
|
||||
|
||||
|
||||
/* ============== Pages
|
||||
========================== */
|
||||
$wp_customize->add_section( 'pages_section' , array(
|
||||
'title' => __( 'First Page' ),
|
||||
'priority' => 30,
|
||||
'description' => 'Select the first page:',
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'first_page' );
|
||||
|
||||
$wp_customize->add_control(
|
||||
new WP_Customize_Control(
|
||||
$wp_customize,
|
||||
'your_setting_id',
|
||||
array(
|
||||
'label' => __( 'First Page?', 'theme_name' ),
|
||||
'section' => 'pages_section',
|
||||
'settings' => 'first_page',
|
||||
'type' => 'dropdown-pages'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
add_action( 'customize_register', 'example_customizer' );
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user