Photogallery
This plugin is meant primarily for theme developers. This plugin allows to collect photos from the the Media Manager and arrange them into albums. These albums can be combined into galleries. Both albums and galleries can be added to a theme’s navigation menu. Note that this plugin does not provide any CSS formatting and JavaScript for frontend presentation of galleries and albums. You have to format them yourself and integrate necessary JavaScript libraries, e.g Lightbox, yourself. This plugin merely gives a framework for gallery and album creation via custom post types and registration of designs for a frontend presentation. If you found a bug or have any questions, complains or suggestions please feel free to contact me. Theme Integration You have to write post type template files for your theme in order for an album or gallery to work. This gives Theme developers the most control over a frontend presentation and users a convenient way to create galleries through the WordPress dashboard. If you install this plugin, create albums and galleries and include them into your theme’s menu, you will be disappointed, since nothing will happen. Create two php files inside your theme’s directory: single-photogallery.php and single-photoalbum.php. single-photogallery.php gets called everytime a gallery is about to be viewed single-photoalbum.php gets called everytime a album is about to be viewed Now you have two options. You can register a custom design inside your theme’s function.php via e.g $kt_Photogallery->register_gallery_design() and call $kt_Photogallery->render() at an appropriated place inside your single-photogallery.php to render it depending on the user’s choice. You fetch albums, images and thumbnail details, and render consistent HTML for all albums and galleries. Refere to the PHP API section for further details on how to retrieve album IDs, image IDs and thumbnail details. Example A basic example for a custom gallery design # functions.php $kt_Photogallery->register_gallery_design ('my_gallery_design', array( 'label' => __('My Gallery Design', 'my-textdomain'), 'icon' => 'dashicons-format-gallery', 'title' => __('This is my custom gallery design', 'my-textdomain'), 'render' => 'render_my_gallery_design' )); $kt_Photogallery->register_album_design ('my_album_design', array( 'label' => __('My Album Design', 'my-textdomain'), 'icon' => 'dashicons-format-image', 'title' => __('This is my custom album design', 'my-textdomain'), 'render' => 'render_my_album_design' )); function render_my_gallery_design ($post) { global $kt_Photogallery; $album_IDs = $kt_Photogallery->get_albums($post); if ($album_IDs) { foreach ($album_IDs as $album_ID) { $album_thumbnail = $kt_Photogallery->get_thumbnail_src($album_ID); echo ' '; if ($album_thumbnail) { echo ' '; } echo ' '; } } else { printf(__('The gallery %s does not contain any albums', 'my-textdomain'), esc_html($post->post_title)); } } function render_my_album_design ($post) { global $kt_Photogallery; $image_IDs = $kt_Photogallery->get_images($post); if ($image_IDs) { foreach ($image_IDs as $image_ID) { $image = get_post($image_ID); if ($image) { $image_src = wp_get_attachment_image_src($image_ID, 'medium'); if (!$image_src) { $image_src = wp_get_attachment_image_src($image_ID, 'full'); } echo ' '; } } } else { printf(__('The album %s does not contain any images', 'my-textdomain'), esc_html($post->post_title)); } } Basic integration into Twenty Fifteen: # single-photogallery.php or single-photoalbum.php get_header(); ?> ', ' '); ?> render(); ?> get_album_count ( [$gallery_ID] ) Returns the number of albums associated with a gallery Argument int|null $gallery_ID Optional – ID of a gallery. Defaults to the current ID if used inside the Loop Returns integer|boolean – Returns an integer on success, or false if $gallery_ID yields no gallery $kt_Photogallery->get_albums ( [$gallery_ID] ) Returns an array of album IDs associated with a gallery. Argument int|null $gallery_ID Optional – ID of a gallery. Defaults to the current ID if used inside the Loop Returns array|boolean – Returns an array of IDs on success, false if $gallery_ID yields no gallery $kt_Photogallery->get_image_count ( [$album_ID] ) Returns the number of images associated with an album Argument int|null $album_ID Optional – ID of an album. Defaults to the current ID if used inside the Loop Returns integer|boolean – Returns an integer on success, or false if $album_ID yields no album $kt_Photogallery->get_images ( [$album_ID] ) Returns an array of image IDs associated with an album. Argument int|null $album_ID Optional – ID of an album. Defaults to the current ID if used inside the Loop Returns array|boolean – Returns an array of IDs on success, false if $album_ID yields no album $kt_Photogallery->get_thumbnail ( [$album_ID, [$fallback] ] ) Returns the ID of the image (attachment) used as thumbnail for an album Argument int|null $album_ID Optional – ID of an album. Defaults to the current ID if used inside the Loop Argument boolean $fallback Optional – if true and $album_ID yields no album the method returns the ID of the first image associated with the album. Default is true Returns integer|false – Returns an integer on success, false if $album_ID yields no album, no thumbnail is set or a fallback could not been resolved $kt_Photogallery->get_thumbnail_src ( [$album_ID, [$fallback] ] ) Returns an ordered array with values corresponding to the (0) url, (1) width, (2) height and (3) scale of the thumbnail associated with an album. Argument int|null $album_ID Optional – ID of an album. Defaults to the current ID if used inside the Loop Argument boolean $fallback Optional – if true and $album_ID yields no album the method returns the ID of the first image associated with the album. Default is true Returns array|false – Returns an array on success, false if $album_ID yields no album, no thumbnail is set or a fallback could not been resolved $kt_Photogallery->register_album_design ( $key, $options ) $kt_Photogallery->register_gallery_design ( $key, $options ) Registers a custom design for albums and galleries respectively. The design will be available in the Design metabox during editing Returns boolean – returns true if the design was registered successfully, false on failure. Argument string $key Required – A key used as id inside HTML/CSS and for general identification Argument callable|array $options Required – A callback rendering the design on the frontend or an associative array: string label – The text for the label string icon – The image shown next to the label. Can be dashicons-*, an URL to an image or a base 64 encoded image string title – Text used inside the HTML title attribute, usually containing a description callback render ($post, $options) – Callback rendering the design on the frontend. The arguments passed are the current post as a WP_Post instance and an associative array of the options straight from the database callback options ($current_options, $defaults, $post) – Callback for additional form fields, should echo HTML. The arguments passed are an associative array of the options straight from the database, the default options as second argument and the current post as a WP_Post instance as third. array defaults – Associative array containing default values for options. Its keys are used during saving so you should generate HTML form fields using its keys and provide a callback for filtering. callback filter ($current_options, $defaults, $post) – Callback for filtering the options before they are saved. This callback is called every time a post is saved. The arguments passed are the default options merged with the values from the current request, the default options as second argument and the current post as a WP_Post instance as third. The callback must return an associative array otherwise no options are stored. $kt_Photogallery->render( [$auto_design] ) Main output method. Depending on the current post type the method prints out a design for a gallery or an album. Argument boolean auto_design optional – If set true and no design is found, take the first registered one and proceed. Default is true Returns boolean – Returns true on success, false otherwise
Top keywords
- album52×4.00%
- id42×3.23%
- gallery26×2.00%
- returns24×1.85%
- image23×1.77%
- post20×1.54%
- design19×1.46%
- array18×1.39%
- kt17×1.31%
- album id16×1.23%
- options16×1.23%
- kt photogallery-15×1.15%
Smart Slider 3
Homepage | Features | Templates | Videos | Docs | Support Smart Slider 3 is the most powerful and intuitive WordPress plugin to create sliders which was never possible before. Fully responsive, SEO optimized and works with any WordPress theme. Create beautiful sliders and tell stories without any code. Live slide editor A beautiful interface makes creating slides fast and efficient. The complete freedom to build what you want, the way you want. Edit your slides as you used to in page builders. Drop layers after each other and structure them with rows and columns. Unique Layouts with Layers Enhance your slider with the layers and make your site even more unique and grandiose. Every heading, text, image, button and video can be edited easily with the customization options. Change all the details that really matter in typography and style. Responsive, Mobile-Ready Sliders Switch your slider to a different device mode and optimize your content for the resolution. Your site can be enjoyed in any environment, be it a mobile, tablet or desktop. Beautiful Sliders to Start No tech skills are needed, just pick a slider template. It works like magic! Choose from a variety of beautiful templates or start with a blank Slider. The simple way to build every kind: image, layer, video and post slider. Most powerful features Default position – Edit your slides as you used to in page builders. Absolute position – Drag and drop your layers anywhere on the slide with absolute layers. Slide Library – Slide Library provides several pre-made slides to kickstart your work. Totally integrated with WordPress – Media manager, shortcode, widget, post permalinks, post editor. Page Builder support – Elementor, Divi, Beaver Builder, Page Builder by SiteOrigin, Visual Composer, WPBakery Page Builder, Gutenberg and many more… Totally responsive and touch friendly – Sliders can be enjoyed on any device, be it a mobile, tablet or desktop. Dynamic Slides – Available source: WordPress posts Customizable controls – Arrows, Bullets, Autoplay, Bar, Thumbnails, Shadows Slide backgrounds – 9 Super smooth background animations Layers – Build unique designs with 6 varied layers: Image, Heading, Text, Button, Vimeo, YouTube Font and Style manager system – Change easily all the details that really matter in typography and style. Template sliders – 15 sliders to start Features: Import and Export sliders Intuitive slide creation: choose images, select WordPress Posts or add YouTube and Vimeo videos Static overlay Touch swipe, scroll, keyboard navigation Full-width and boxed responsive layouts Slide-switching animations: Horizontal, Vertical, Fade Slide background animations Autoplay timing options Slider controls: Arrow, Bullet, Autoplay, Bar, Thumbnail and Shadow SEO optimized Layers: Image, Heading, Text, Button, Vimeo, YouTube Layer snap in visual slide editor Adaptive layer font sizing Hide layers on specific devices Slide thumbnail image WordPress Multi Site compatible Custom responsive breakpoints Testimonials “I can heartily recommend the free version. It already provides more functionality than any other slider plugin – even many premium ones.” – Daniel Pataki – WPMU DEV “Having tried more than a few WordPress slider plugins, both free and paid, I can honestly say that this is one of the best that I’ve ever tested…” – Daryn Collier – WPKube “Since Smart Slider is free to use, I do not have to really stress how good a plugin it is because you can download it yourself and see for yourself.” – Kevin Muldoon “This plugin can be used for much more than a simple slider – being able to create whole sections of your website.” – Oliver Dale – WPLift “Taking all this into consideration we can safely say that Smart Slider 3 is one of the top WordPress slider plugins.” – Mark Zahra – WP Mayor Support Smart Slider 3 is a community-driven project that would not be the same without your feedback. If you have any problem or feature request for this plugin, please feel free to contact us! Smart Slider 3 Pro Features: All template sliders Layer animation builder Live animation timeline 18 extra layers 2 extra slider types Full page responsive layout All generators for dynamic slides Extra background animations (more than 54) Built-in lightbox Advanced controls and many more control presets A ton of customization options Premium support Full list of features Unlock Your Full Potential with Smart Slider 3 Pro Dynamic slide sources in the FREE version WordPress Posts: WordPress posts by Category and Tag filter or only the specified posts. Dynamic slide sources in PRO version WordPress Custom Posts: WordPress posts from custom post types by custom taxonomy filter or only the specified custom posts WooCommerce slider from products: Woocommerce products by Category, Tag, Featured, In Stock and downloadable filter or only the specified products. NextGEN Gallery: displays the images and related meta from the selected source gallery. Events: Events by Category and Tag filter. Supported plugins: All-in-One Event Calendar, Events Manager, The Events Calendar Image slider: displays the images and related meta from the selected source gallery. Supported plugins: Gallery by BestWebSoft, Photo Gallery by WD Social dynamic sources: Twitter, Facebook, Flickr, Picasa, YouTube, Pinterest Translations English Spanish (es_ES) 99% Portuguese (Brasil) (pt_BR) 60% Polish (pl_PL) 60% Russian (ru_RU) 59% Italian (it_IT) 55% French (fr_FR) 50% Hungarian (hu_HU) 44% Traditional Chinese (zh_TW) 42% Finnish (fi_FI) 39% Japanese (ja_JP) 37% German (de_DE) 31% Is Smart Slider 3 the tool you’ve been looking for? Come hang out in our Facebook Community for tips and inspiration. Dive into our fun YouTube tutorials and supercharge your skills. Show some love on WordPress with a rating to support us. Get inspired daily on Twitter by following us.