array( 'id' => 'apbasic_page_layout', 'value' => 'default_layout', 'label' => __('Default Layout', 'accesspress-basic'), 'img' => 'default.png' ), 'right-sidebar-layout' => array( 'id' => 'apbasic_page_layout', 'value' => 'right_sidebar', 'label' => __('Right Sidebar','accesspress-basic'), 'img' => 'right-sidebar.png' ), 'left-sidebar-layout' => array( 'id' => 'apbasic_page_layout', 'value' => 'left_sidebar', 'label' => __('Left Sidebar','accesspress-basic'), 'img' => 'left-sidebar.png' ), 'both-sidebar-layout' => array( 'id' => 'apbasic_page_layout', 'value' => 'both_sidebar', 'label' => __('Both Sidebar','accesspress-basic'), 'img' => 'both-sidebar.png' ), 'no-sidebar-wide-layout' => array( 'id' => 'apbasic_page_layout', 'value' => 'no_sidebar_wide', 'label' => __('No Sidebar Wide','accesspress-basic'), 'img' => 'no-sidebar-wide.png' ), 'no-sidebar-narrow-layout' => array( 'id' => 'apbasic_page_layout', 'value' => 'no_sidebar_narrow', 'label' => __('No Sidebar Narrow','accesspress-basic'), 'img' => 'no-sidebar-narrow.png' ) ); /** * Displays option to select Page Layout */ function accesspress_basic_page_layout(){ global $accesspress_basic_page_layout, $post; wp_nonce_field( basename( __FILE__ ), 'custom_meta_box_nonce' ); foreach ($accesspress_basic_page_layout as $field) : $layout_meta = get_post_meta( $post->ID, $field['id'], true ); if( empty( $layout_meta ) ) { $layout_meta = 'default_layout'; } ?>
/>