Skip to content

Instantly share code, notes, and snippets.

@saqibsarwar
Last active April 11, 2016 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saqibsarwar/ac29ad41ea75e276535d4c578b0c776b to your computer and use it in GitHub Desktop.
Save saqibsarwar/ac29ad41ea75e276535d4c578b0c776b to your computer and use it in GitHub Desktop.
<?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