array( 'id' => 'creative_blog_page_layout', 'value' => 'default_layout', 'label' => esc_html__('Default Layout', 'creative-blog'), ), 'right-sidebar' => array( 'id' => 'creative_blog_page_layout', 'value' => 'right_sidebar', 'label' => esc_html__('Right Sidebar', 'creative-blog'), ), 'left-sidebar' => array( 'id' => 'creative_blog_page_layout', 'value' => 'left_sidebar', 'label' => esc_html__('Left Sidebar', 'creative-blog'), ), 'no-sidebar-full-width' => array( 'id' => 'creative_blog_page_layout', 'value' => 'no_sidebar_full_width', 'label' => esc_html__('No Sidebar Full Width', 'creative-blog'), ), 'no-sidebar-content-centered' => array( 'id' => 'creative_blog_page_layout', 'value' => 'no_sidebar_content_centered', 'label' => esc_html__('No Sidebar Content Centered', 'creative-blog'), ), ); /** * Displaying the metabox in the editor section for select layout option of the post/page individually */ function creative_blog_page_layout() { global $creative_blog_page_layout, $post; // Use nonce for verification wp_nonce_field(basename(__FILE__), 'custom_meta_box_nonce'); foreach ($creative_blog_page_layout as $field) { $creative_blog_layout_meta = get_post_meta($post->ID, $field['id'], true); if (empty($creative_blog_layout_meta)) { $creative_blog_layout_meta = 'default_layout'; } ?> />