( 'Photo Gallery'), 'singular_name' => ( 'Photo gallery'), 'add_new' => ( 'Add New Photo'), 'add_new_item' => ( 'Add New Photo'), 'edit_item' => ( 'Edit Photo'), 'new_item' => ( 'New Photo'), 'view_item' => ( 'View Photo'), 'search_items' => ( 'Search Gallery Photo'), 'not_found' => ( 'No Gallery Photo Found'), 'not_found_in_trash' => ( 'No photo found in Trash'), 'parent_item_colon' => ( 'Parent photo:'), 'menu_name' => ( 'Artificial Gallery'), ); $args = array( 'labels' => $labels, 'hierarchical' => false, 'description' => 'Add your gallery photo!', 'supports' => array( 'title', 'custom-fields'), 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => false, 'publicly_queryable' => true, 'exclude_from_search' => false, 'has_archive' => true, 'query_var' => true, 'can_export' => true, 'rewrite' => true, 'capability_type' => 'post' ); register_post_type( 'photo-gallery', $args ); } add_action( 'init', 'artificial_photo_gallery_post' ); // Photo Gallery Taxonomy function artificial_photo_gallery_taxonomy() { register_taxonomy( 'gallery_cat', 'photo-gallery', array( 'hierarchical' => true, 'label' => 'Gallery Category', 'query_var' => true, 'rewrite' => array( 'slug' => 'gallery-cat', 'with_front' => true ) ) ); } add_action( 'init', 'artificial_photo_gallery_taxonomy'); function artificial_gallery_meta_boxes() { if ( ! class_exists( 'cmb_Meta_Box' ) ) require_once 'cmb/init.php'; } add_action( 'init', 'artificial_gallery_meta_boxes', 9999 ); function photo_gallery_metaboxes( $meta_boxes ) { $meta_boxes['gallery_metabox'] = array( 'id' => 'gallery_metabox', 'title' => 'Add Gallery Image ', 'pages' => array('photo-gallery'), 'context' => 'normal', 'priority' => 'high', 'show_names' => true, 'fields' => array( array( 'name' => 'Add Image ', 'desc' => 'Upload your gallery image', 'id' => 'gallery_image', 'type' => 'file' ), array( 'name' => 'Add Image Description', 'desc' => 'Write something about your image', 'id' => 'image_des', 'type' => 'textarea' ), ), ); return $meta_boxes; } add_filter( 'cmb_meta_boxes', 'photo_gallery_metaboxes' ); // Loop function artificial_photo_gallery_shortcode(){ $q = new WP_Query( array('posts_per_page' => '-1', 'post_type' => 'photo-gallery', 'gallery_cat' => '') ); $list = ' '; wp_reset_query(); return $list; } add_shortcode('artificial-gallery', 'artificial_photo_gallery_shortcode'); /* Theme options START*/ function artificial_photo_gallery_options_framwrork() { add_options_page('Artificial Photo Gallery', 'Artificial Photo Gallery Options', 'manage_options', 'artificialphotogallery-settings','artificial_photogallery_options_framwrork'); } add_action('admin_menu', 'artificial_photo_gallery_options_framwrork'); // Default options values $artificialphotogallery_options = array( 'width' => 800, 'height' => 500, 'panel_smoothness' => 15, 'position' => 'bottom' ); if ( is_admin() ) : // Load only if we are viewing an admin page function artificialphotogallery_register_settings() { // Register settings and call sanitation functions register_setting( 'artificial_photo_gallery_p_options', 'artificialphotogallery_options', 'artificialphotogallery_validate_options' ); } add_action( 'admin_init', 'artificialphotogallery_register_settings' ); // Function to generate options page function artificial_photogallery_options_framwrork() { global $artificialphotogallery_options; if ( ! isset( $_REQUEST['updated'] ) ) $_REQUEST['updated'] = false; // This checks whether the form has just been submitted. ?>

Artificial Photo Gallery

Premium WordPress Plugin

Put width of gallery panel here(example: 800). Default value is 800.

Put height of gallery panel here(example: 500). Default value is 500.

Determines smoothness of tracking pan animation (higher number = smoother).

Put gallery thumbnail position here(example: bottom). Default value is bottom. You can move thumbnail in left, top, right, bottom.