'single_image', 'id' => 'cyberchimps_boxes_lite_image_one', 'class' => '', 'name' => __( 'First Box Image', 'cyberchimps_core' ), 'std' => $directory . '/elements/lib/images/boxes/slidericon.png' ), array( 'type' => 'text', 'id' => 'cyberchimps_boxes_link_url_one', 'class' => '', 'name' => __( 'First Link URL', 'cyberchimps_core' ), 'std' => esc_url( home_url() ) ), array( 'type' => 'textarea', 'id' => 'cyberchimps_boxes_lite_image_one_text', 'class' => '', 'name' => __( 'First Box Text', 'cyberchimps_core' ), 'std' => 'Showcase your informative posts with style. Display featured Images and author name using boxes element.' ), // Box two array( 'type' => 'single_image', 'id' => 'cyberchimps_boxes_lite_image_two', 'class' => '', 'name' => __( 'Second Box Image', 'cyberchimps_core' ), 'std' => $directory . '/elements/lib/images/boxes/slidericon.png' ), array( 'type' => 'text', 'id' => 'cyberchimps_boxes_link_url_two', 'class' => '', 'name' => __( 'Second Link URL', 'cyberchimps_core' ), 'std' => esc_url( home_url() ) ), array( 'type' => 'textarea', 'id' => 'cyberchimps_boxes_lite_image_two_text', 'class' => '', 'name' => __( 'Second Box Text', 'cyberchimps_core' ), 'std' => 'Showcase your informative posts with style. Display featured Images and author name using boxes element.' ), // Box three array( 'type' => 'single_image', 'id' => 'cyberchimps_boxes_lite_image_three', 'class' => '', 'name' => __( 'Third Box Image', 'cyberchimps_core' ), 'std' => $directory . '/elements/lib/images/boxes/slidericon.png' ), array( 'type' => 'text', 'id' => 'cyberchimps_boxes_link_url_three', 'class' => '', 'name' => __( 'Third Link URL', 'cyberchimps_core' ), 'std' => esc_url( home_url() ) ), array( 'type' => 'textarea', 'id' => 'cyberchimps_boxes_lite_image_three_text', 'class' => '', 'name' => __( 'Third Box Text', 'cyberchimps_core' ), 'std' => 'Showcase your informative posts with style. Display featured Images and author name using boxes element.' ), ); /* * configure your meta box */ $page_config = array( 'id' => 'boxes_lite_options', // meta box id, unique per meta box 'title' => __( 'Boxes Lite Options', 'cyberchimps_core' ), // meta box title 'pages' => array( 'page' ), // post types, accept custom post types as well, default is array('post'); optional 'context' => 'normal', // where the meta box appear: normal (default), advanced, side; optional 'priority' => 'low', // order of meta box: high (default), low; optional 'fields' => $page_fields, // list of meta fields (can be added by field arrays) 'local_images' => false, // Use local or hosted images (meta box images for add/remove) 'use_with_theme' => true //change path if used with theme set to true, false for a plugin or anything else for a custom path(default false). ); /* * Initiate your meta box */ $page_meta = new Cyberchimps_Meta_Box( $page_config ); } // Boxes Lite element action add_action( 'boxes_lite', 'cyberchimps_boxes_lite_content' ); // Defining content of the boxes-lite element function cyberchimps_boxes_lite_content() { // Set directory uri $directory_uri = get_template_directory_uri(); global $post; if( is_page() ) { // Getting Image URL for each box $img1 = get_post_meta( $post->ID, 'cyberchimps_boxes_lite_image_one', true ); $img2 = get_post_meta( $post->ID, 'cyberchimps_boxes_lite_image_two', true ); $img3 = get_post_meta( $post->ID, 'cyberchimps_boxes_lite_image_three', true ); // Getting URL of custom link $url1 = get_post_meta( $post->ID, 'cyberchimps_boxes_link_url_one', true ); $url2 = get_post_meta( $post->ID, 'cyberchimps_boxes_link_url_two', true ); $url3 = get_post_meta( $post->ID, 'cyberchimps_boxes_link_url_three', true ); $box_default_text = 'Showcase your informative posts with style. Display featured Images and author name using boxes element'; // Getting text for each box $text1 = get_post_meta( $post->ID, 'cyberchimps_boxes_lite_image_one_text', true ); $text2 = get_post_meta( $post->ID, 'cyberchimps_boxes_lite_image_two_text', true ); $text3 = get_post_meta( $post->ID, 'cyberchimps_boxes_lite_image_three_text', true ); } else { // Getting Image URL for each box $img1 = get_theme_mod( 'cyberchimps_blog_boxes_lite_image_one', get_template_directory_uri() . apply_filters( 'cyberchimps_boxes_lite_img1', '/elements/lib/images/boxes/blueprint.png' )); $img2 = get_theme_mod( 'cyberchimps_blog_boxes_lite_image_two', get_template_directory_uri() . apply_filters( 'cyberchimps_boxes_lite_img2', '/elements/lib/images/boxes/blueprint.png' )); $img3 = get_theme_mod( 'cyberchimps_blog_boxes_lite_image_three', get_template_directory_uri() . apply_filters( 'cyberchimps_boxes_lite_img3', '/elements/lib/images/boxes/blueprint.png' )); // Getting URL of custom link $url1 = get_theme_mod( 'cyberchimps_blog_boxes_link_url_one' , apply_filters('cyberchimps_blog_boxes_link_url_one' , '')); $url2 = get_theme_mod( 'cyberchimps_blog_boxes_link_url_two' , apply_filters('cyberchimps_blog_boxes_link_url_two' , '')); $url3 = get_theme_mod( 'cyberchimps_blog_boxes_link_url_three' , apply_filters('cyberchimps_blog_boxes_link_url_three' , '')); $box_default_text = 'Showcase your informative posts with style. Display featured Images and author name using boxes element.'; // Getting text for each box $text1 = get_theme_mod( 'cyberchimps_blog_boxes_lite_image_one_text' , apply_filters('cyberchimps_blog_boxes_lite_image_one_text' , '')); $text2 = get_theme_mod( 'cyberchimps_blog_boxes_lite_image_two_text' , apply_filters('cyberchimps_blog_boxes_lite_image_two_text' , '')); $text3 = get_theme_mod( 'cyberchimps_blog_boxes_lite_image_three_text' , apply_filters('cyberchimps_blog_boxes_lite_image_three_text' , '') ); } ?>