array(
'id' => 'akbar_page_layout',
'value' => 'default_layout',
'label' => __('Default Layout', 'akbar')
),
'right-sidebar' => array(
'id' => 'akbar_page_layout',
'value' => 'right_sidebar',
'label' => __('Right Sidebar', 'akbar')
),
'left-sidebar' => array(
'id' => 'akbar_page_layout',
'value' => 'left_sidebar',
'label' => __('Left Sidebar', 'akbar')
),
'no-sidebar-full-width' => array(
'id' => 'akbar_page_layout',
'value' => 'no_sidebar_full_width',
'label' => __('No Sidebar Full Width', 'akbar')
),
'no-sidebar-content-centered' => array(
'id' => 'akbar_page_layout',
'value' => 'no_sidebar_content_centered',
'label' => __('No Sidebar Content Centered', 'akbar')
)
);
/****************************************************************************************/
/**
* Displays metabox to for select layout option
*/
function akbar_page_layout()
{
global $page_layout, $post;
// Use nonce for verification
wp_nonce_field(basename(__FILE__), 'custom_meta_box_nonce');
foreach ($page_layout as $field) {
$layout_meta = get_post_meta($post->ID, $field['id'], true);
if (empty($layout_meta)) {
$layout_meta = 'default_layout';
}
?>
/>