Envira Gallery Documentation
Documentation, Reference Materials and Tutorials for Envira Gallery
Documentation, Reference Materials and Tutorials for Envira Gallery
Would you like to enable archives for standalone links in Envira Gallery? You can easily do this by creating a custom plugin. This documentation will help walk you through the steps needed to enable archives for standalone links in Envira Gallery.
Archives is a list of all galleries you’ve created and each gallery would list as a link to the gallery standalone link.
To enable archives for the standalone feature in Envira, just add the following code to a new file at wp-content/plugins/envira-standalone-archive-support.php
.
<?php /** * Plugin Name: Envira Gallery - Standalone Feature - Enable Archives * Plugin URI: https://enviragallery.com * Version: 1.0 * Author: Envira Gallery Team * Author URI: https://enviragallery.com * Description: Enables archives for Envira Custom Post Type */ /** * Enable archives and featured image capabilities on Envira Galleries */ function envira_standalone_enable_archives( $post_args ) { $post_args['has_archive'] = true; $post_args['supports'] = array( 'title', 'thumbnail' ); return $post_args; } add_filter('envira_gallery_post_type_args', 'envira_standalone_enable_archives');
If you’re unsure how to create a plugin file, follow these steps below:
envira-standalone-archive-support.php
Your next step is to activate the plugin you just uploaded. Simply navigate to the Plugins from within your WordPress dashboard and activate the Envira Gallery – Standalone Feature – Enable Archives plugin.
And that’s it! If you’ve set a featured image on your Envira gallery, then the title of the gallery and the featured image will show on your archive page.
If you’d like to extend Envira further, check out our tutorial on How to Load Your Gallery Lightbox from a Text Link.
A: The archive pages uses the slug of your galleries you’ve specified in the WordPress Admin » Envira Gallery » Settings » Standalone tab view.
For example, if you’ve set your Standalone Gallery slug to “my_gallery” then you can view the archive at http://yourwebsite.com/my_gallery/
A: You may need to navigate to the WordPress Admin » Settings » Permalinks and re-save your site’s permalink settings.
A: This is designed for developers only.
To style your archives, you’ll need to create a new child theme template file named archive-envira.php
and create the HTML and CSS to suit your needs. If you’re not sure where to start, you may want to work with a developer to achieve your goals.