Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?php
if ( ! function_exists( 'inspiry_single_post_customizer' ) ) :
function inspiry_single_post_customizer( WP_Customize_Manager $wp_customize ) {
/**
* Single Post Section
*/
$wp_customize->add_section( 'inspiry_single_post_options', array (
'title' => __( 'Single Post', 'inspiry' ),
'priority' => 123,
) );
/* Post Layout */
$wp_customize->add_setting( 'inspiry_post_layout', array (
'default' => 'one',
) );
$wp_customize->add_control( 'inspiry_post_layout', array (
'label' => __( 'Single Post Layout', 'inspiry' ),
'type' => 'radio',
'section' => 'inspiry_single_post_options',
'choices' => array (
'one' => __( 'Full Width Layout', 'inspiry' ),
'two' => __( 'Layout With Sidebar', 'inspiry' ),
)
) );
}
add_action( 'customize_register', 'inspiry_single_post_customizer' );
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment