array( 'name' => __('Boxes Lite', 'cyberchimps_elements' ), 'singular_name' => __('Boxes Lite', 'cyberchimps_elements' ), ), 'public' => true, 'show_ui' => true, 'supports' => array('title'), 'has_archive' => true, 'menu_icon' => get_template_directory_uri() . '/cyberchimps/lib/images/custom-types/boxes.png', 'rewrite' => array('slug' => 'boxes') ) ); $meta_boxes = array(); $mb = new Chimps_Metabox('boxes_lite', __( 'Boxes Lite Element', 'cyberchimps_elements' ), array('pages' => array('boxes_lite'))); $mb ->tab( __( 'Boxes Lite Element', 'cyberchimps_elements' ) ) ->single_image('cyberchimps_box_image', __( 'Box Image', 'cyberchimps_elements' ), '') ->text('cyberchimps_box_url', __( 'Box URL', 'cyberchimps_elements' ), '') ->textarea('cyberchimps_box_text', __( 'Box Text', 'cyberchimps_elements' ), '') ->end(); foreach ($meta_boxes as $meta_box) { $my_box = new RW_Meta_Box_Taxonomy($meta_box); } } add_action( 'init', 'cyberchimps_init_boxes_post_type' ); add_action( 'boxes_lite', 'cyberchimps_boxes_render_display' ); //Limit number of posts that can be created in free version function cyberchimps_box_limit() { global $pagenow, $typenow; $count_posts = get_posts( array( 'post_type' => 'boxes_lite', 'post_status' => 'publish' ) ); $count = count( $count_posts ); if( $count >= 3 ) { echo ''; if( $pagenow == 'edit.php' && $typenow == 'boxes_lite' ){ echo ''; } if( $pagenow == 'post.php' && $typenow == 'boxes_lite' ){ echo ''; } } } add_action( 'admin_head', 'cyberchimps_box_limit' ); // Define content for boxes function cyberchimps_boxes_render_display() { // Set directory uri $directory_uri = get_template_directory_uri(); // Intialize box counter $box_counter = 1; // Custom box query $args = array( 'numberposts' => 3, 'offset' => 0, 'orderby' => 'post_date', 'order' => 'ASC', 'post_type' => 'boxes_lite', 'post_status' => 'publish' ); $boxes = get_posts( $args ); ?>
3 ) break; // Get the image of the box $box_image = get_post_meta( $box->ID, 'cyberchimps_box_image', true ); // Get the URL of the box $box_url = get_post_meta( $box->ID, 'cyberchimps_box_url', true ); // Get the text of the box $box_text = get_post_meta( $box->ID, 'cyberchimps_box_text', true ); ?>

post_title; ?>

array(),'em' => array(),'strong' => array() ) ); ?>