In Wordpress plugin gallery "Everest Gallery" got some tabs which first display ALL pictures, and next according to the category assigned to a given photo. For example: ALL | GROUP 1 | GROUP 2. Choosen tab is later displayed as "active" one.
What I need to get is to hide the tab responsible for ALL. Code of two tabs below when first is choosen as active and the second is inactive (there are two different classes in css):
<li><a href="javascript:void(0);" data-filter-key="all" data-layout-type="masonary">ALL</a></li>
<li><a href="javascript:void(0);" data-filter-key="h3MyESImhP" data-layout-type="masonary">GROUP 1</a></li>
I figure out that I can hide ALL group using below code in custom css section:
[data-filter-key="all"] {display: none;}
And it works! The problem is that on the first look, gallery still display all the pictures before I click on any other GROUP tab. How to make eg. GROUP 1 with data-filter-key="h3MyESImhP"
display as a default?
I'm not programmer, so I hope that everything here is explained correctly and clearly for you. Thanks in advance!
CodePudding user response:
Thats not a css question, there should be default setting in the Plugin. CSS has nothing to do with load data. You can only hide/show like the way you figured out.
If there is no config in the Plugin for that you have to change the php file in the Plugin, but after every update it will be overwritten.
CodePudding user response:
Woogielicious, once again thanks for the help. Below you can find the code of everest-gallery.php
Have no idea what to add here. I guess that I have to use data-filter-key="h3MyESImhP"
somehow.
<?php
defined('ABSPATH') or die('No script kiddies please!!');
/*
Plugin Name: Everest Gallery
Plugin URI: http://accesspressthemes.com/wordpress-plugins/everest-gallery
Description: All in one gallery plugin for WordPress. Photo, Audio, Video, Multimedia, Portfolio - for almost everything!
Version: 1.0.7
Author: AccessPress Themes
Author URI: http://accesspressthemes.com
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Domain Path: /languages
Text Domain: everest-gallery
*/
/**
* Plugin Main Class
*
* @since 1.0.0
*/
if ( !class_exists('Everest_gallery') ) {
class Everest_gallery {
/**
* Plugin Main initialization
*
* @since 1.0.0
*/
function __construct() {
$this->define_constants();
$this->includes();
}
/**
* Necessary Constants Define
*
* @since 1.0.0
*/
function define_constants() {
global $wpdb;
defined('EG_PATH') or define('EG_PATH', plugin_dir_path(__FILE__));
defined('EG_URL') or define('EG_URL', plugin_dir_url(__FILE__));
defined('EG_IMG_DIR') or define('EG_IMG_DIR', plugin_dir_url(__FILE__) . 'images/');
defined('EG_CSS_DIR') or define('EG_CSS_DIR', plugin_dir_url(__FILE__) . 'css/');
defined('EG_JS_DIR') or define('EG_JS_DIR', plugin_dir_url(__FILE__) . 'js/');
defined('EG_VERSION') or define('EG_VERSION', '1.0.7');
defined('EG_GALLERY_TABLE') or define('EG_GALLERY_TABLE', $wpdb->prefix . 'eg_galleries');
}
/**
* Includes all the necessary files
*
* @since 1.0.0
*/
function includes() {
include(EG_PATH . 'includes/classes/class-eg-library.php');
include(EG_PATH . 'includes/classes/class-eg-model.php');
include(EG_PATH . 'includes/classes/class-eg-mobile-detect.php');
include(EG_PATH . 'includes/classes/class-eg-activation.php');
include(EG_PATH . 'includes/classes/class-eg-enqueue.php');
include(EG_PATH . 'includes/classes/class-eg-admin.php');
include(EG_PATH . 'includes/classes/class-eg-admin-ajax.php');
include(EG_PATH . 'includes/classes/class-eg-ajax.php');
include(EG_PATH . 'includes/classes/class-eg-shortcode.php');
include(EG_PATH . 'includes/classes/class-eg-hooks.php');
}
}
$GLOBALS[ 'everest_gallery' ] = new Everest_gallery();
$GLOBALS[ 'eg_settings' ] = get_option('eg_settings');
}