Install metabox plugin and active:
/**** Add this code in your function.php ****/
$meta_boxes[] = array(
'id' => 'post_sidebar',
'title' => 'post Sidebar',
'pages' => array('post'),
'priority' => 'low',
'fields' => array(
array(
'name' => 'Post Sidebar',
'id' => 'post_sidebar',
'type' => 'select',
"options" => array( "0" => "OFF", "1" => "Left side", "2" => "Right Side"),
),
)
);
if ( class_exists( 'RW_Meta_Box' ) )
{
foreach ( $meta_boxes as $meta_box )
{
new RW_Meta_Box( $meta_box );
}
}
/**** after single.php on get value using this one option ****/
$sidebar_value = get_post_meta($post->ID,'post_sidebar',true);
if($sidebar_value == 1 && $sidebar_value!=0){
// Add sidebar code for left side
}
if($sidebar_value=='2' && $sidebar_value!=0){
// Add sidebar code for right side
}