1. Home
  2. Docs
  3. Flexi Gallery
  4. Shortcode
  5. [flexi-gallery]

[flexi-gallery]

Login

This is a shortcode of Flexi Gallery which will display a set of gallery based on filters at shortcode.
Use this shortcode anywhere you like and it is very flexible.
If this contains any attributes it will override the Flexi settings.

Available attributes for

album="slug name of album" : To display gallery of specific album/category. Multiple album separated by commas. The albums can be created from Flexi Category of dashboard.

tag="slug name of tag" : To display gallery of specific Flexi-Post tags. Multiple tags can be inserted separated by commas. The tag can be created from Flexi Tags from dashboard.

tag_show="on,off" : To display related tags just above the gallery.

column="No. of Rows" : Number of post to be displayed per row/horizontally

perpage="No. of total post" : Number of total post to be displayed per page.

orderby="date | title | modified | ID | rand " : 5 different ways the gallery can be sorted.
For eg. If you want to list post with last modified date.

 

layout="Layout name" : Each gallery can have their own type of layout. There are several default layouts available (i.e. masonry, regular, simple).

popup="on , custom, off" : If the value is on the lightbox is used. The post when clicked will have a popup box instead going to another page. The other page would be a detail page.
custom parameter will use custom layout for the popup which can show/hide different elements.

navigation="page, scroll, button" : Set the navigation style for the gallery. ‘page’ is for page numbers, ‘scroll’ is for display gallery on mouse scroll & ‘button’ is page load more button.

user="username" : The parameter is used to show a post gallery submitted by a particular username.
user="show_mine" : Display gallery based on dynamic logged in user.

Gallery of specific username

No records
will display all images submitted by username john

If you need dynamic username based on user login.
Eg. will display gallery of current loggedin user.

width="150" height="150" : In example, the parameter is 150px for thumbnail image height & width. It only changes the image container size without any modification of actual image size

hover_effect="flexi_effect_1| flexi_effect_2| flexi_effect_3" : flexi_effect_1 is a class name with blur effect. Similarly flexi_effect_2 is grayscale & flexi_effect_3 is zoom. It is visible when mouse is moved over the image at gallery.

hover_caption="flexi_caption_none| flexi_caption_1| flexi_caption_2" : flexi_caption_none is will now show any title of image. flexi_caption_1 to flexi_caption_5 is available with different title display. It is visible when mouse is moved over the image at gallery.

post_status="published | draft | pending" : Displays results based on post status. The under review post are generally marked as draft status.

clear="true" : This is special attribute required when if you are using multiple gallery one same page. It is built so that all the gallery will be uniquely specified which prevents from conflicts with other gallery.
This will automatically add some settings to it.
a) Disable navigation
b) Disable tags above gallery
c) Each gallery will be given unique name to prevents from multiple popup.

attach="true" : Stress free individual gallery is generated. Click here for detail.

evalue="title:on,excerpt:on,custom:on,icon:on,category:on,tag:on,": Many parameters or none can be passed. It can be used for developers too if need to require to pass additional custom defined field.
Currently supported fields are
title: Post title
excerpt: Post short description
custom: Display all available custom fields. Toggle custom fields display on selected area by clicking here.
icon: Displays toolbar contains (profile, trash, download) etc.
category: Displays category name with link
tag: Displays assigned tag with link

Filter by custom fields: Flexi fields is available from 1 to 20. Means fields name starts from flexi_field_1 to flexi_field_20.
For example: You have used flexi_field_2 for colors in forms.
To list gallery whose color is red write shortcode as

No records
.
To list gallery whose color is red & blue write shortcode as
No records
. Values should be separated by double dots (..)

php_field: This is must advance attribute introduced from Flexi 4.1. The aim of this attribute is to run own PHP function so that it extends the limitation of Flexi. This attribute may not work on all layouts. It was specially build for “table layout“.
For example: Layout not available: table
This will add new column ‘Date’ into the table which will display post submitted date.
get_the_date is the wordpress built-in function and ‘Date’ is the argument passed into. In background it will be executed as get_the_date();
Syntax: php_feild=" {Label} : {PHP_Function} : {Parameter 1} : {Parameter 2} : {Parameter 3}