Shortcode to Display Gallery
There are 2 types of UPG Gallery.
- Embed gallery : [upg-attach] shortcode can be used in any wordpress post/pages. The images/video submitted at this page will have own set of gallery specific to embed page.
- Primary gallery : [upg-list] shortcode must be used in wordpress page. It will display gallery of all the images/video posted on different post.
Example: [upg-list perrow="1" perpage="4" album="fruits"]
Available Parameters of Shortcode for [upg-list]:
album="slug name of album" : To display gallery of specific album/category. The albums can be created from UPG-Post Alubms of dashboard.
tag="slug name of tag" : To display gallery of specific UPG-Post tags. The tag can be created from UPG-Post Tags of dashboard.
perrow="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.
page="off , on" : If value is on the page navigation is shown, if perpage value is less then the total number of post.
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. list, flat and personal). personal layout is the most used one because the way of displaying can be modified to match your own requirement. The modification of the file is done from Layout Editor from dashboard. Modify or use the personal layout only if you have some basic knowledge of PHP & HTML
popup="on , 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 preview page.
button="on , off" : The parameter is used to show a submission button at the gallery page. The submission button selected at UPG settings is displayed. If the shortcode parameter value is off , the buttons are not displayed even if it is set to show at UPG settings.
author="on , off" : The parameter is used to show a author profile avatar at the top of gallery page. By default the parameter is on.
Note: The profile icon seen at bottom of UPG post can be turned on/off only from UPG settings.
user="username" : The parameter is used to show a post gallery submitted by a particular username.
To show gallery of current logged in user, type ditto as user="show_mine"
show_mine user is reserved username of UPG.
Available Parameters of Shortcode for [upg-attach]:
type="image" : This is default type. It will display submission form for image only.
type="youtube" : Use this parameter to display form to submit youtube & vimeo url submission form