array( 'id' => 'colormag_page_layout', 'value' => 'default_layout', 'label' => __( 'Default Layout', 'colormag' ) ), 'right-sidebar' => array( 'id' => 'colormag_page_layout', 'value' => 'right_sidebar', 'label' => __( 'Right Sidebar', 'colormag' ) ), 'left-sidebar' => array( 'id' => 'colormag_page_layout', 'value' => 'left_sidebar', 'label' => __( 'Left Sidebar', 'colormag' ) ), 'no-sidebar-full-width' => array( 'id' => 'colormag_page_layout', 'value' => 'no_sidebar_full_width', 'label' => __( 'No Sidebar Full Width', 'colormag' ) ), 'no-sidebar-content-centered' => array( 'id' => 'colormag_page_layout', 'value' => 'no_sidebar_content_centered', 'label' => __( 'No Sidebar Content Centered', 'colormag' ) ) ); /****************************************************************************************/ /** * Displays metabox to for select layout option */ function colormag_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'; } ?> />