Shortcode Reference

 

To get familiar with wppa shortcodes: first try the shortcode generator

Gutenberg editor

4932

Shortcode generators in Gutenberg - Block selector

4933

Shortcode generators in Gutenberg - Gallery shortcode dialog

4934

Shortcode generators in Gutenberg - Preview

4935

Shortcode generators in Gutenberg - Final result

Classic editor


4629

Shortcode generator icon

4630

Shortcode generator dialog



Not every possible shortcode option is covered by the shortcode generator. This page documents all available shortcode attributes and options.

The basic shortcode for the insertion of a wppa+ display in a page or post is: [wppa].
The shortcode allows attributes that specify the type of wppa+ display as well as the specification of albums, photos or special selection of photos.

The basic structure is: [wppa attr1="value1" attr2="value2" ...] The sequence order of attributes is irrelevant.

Important note: Make sure you do not accidently create the shortcode by a copy from an example text or an email. The double quotes might be "texturized" i.e. opening and closing quotes in stead of simple double quotes. This will result in unwanted behaviour!

Attributes

Attrubte Description Remarks
type The type of the display Default: generic, see the table of types
album The album spicification See the table of album specifications
photo The photo specification See the table of photo specifications
size The width (if not the default) Examples:
size="auto" to make a responsive display with 100% width. This is the default
size="450" to get a display of 450 pixels wide
size="auto,450" to get a responsive display with a maximum of 450 pixels wide
size="0.75" to get a responsive display with a width of 75% of the available width
align The horizontal alignment
Can be one out of left, center, right. Example:
align="center"
Note: Omission of this argument is not the same as align="left". align="left" adds 'clear:left;float:left;margin-right:10px;' to the container style.
taglist Tags to use Used in:
type="multitag" taglist="tag1,tag2,tag3..."
and
type="tagcloud" taglist="tag1,tag2,tag3..."
cols Number of columns Used in:
type="multitag" cols="3" for 3 columns
cols="6,2" for 6 columns on pc and 2 on mobile devices
sub Enable subsearch
Used in:
type="search" sub="1"
Equivalent to the corresponding widget option
root Enable rootsearch
Used in:
type="search" root="1"
Equivalent to the corresponding widget option
calendar Specify calendar type Used in:
type="calendar" calendar="timestamp"
Possible options: 'exifdtm', 'timestamp', 'modified', 'realexifdtm', 'realtimestamp', 'realmodified'.
all Specifies that all days are initially opened Used in:
type="calendar" all="1"
Use of this option is strongly discouraged!
reverse Specifies 'last day first' Used in:
type="calendar" reverse="1"
landing Specifies search landing page Used in:
type="search" landing="1234"
admin Specifies 'admins choice' users Used in:
type="choice" admin="admin,opa-jaap,pietje"
parent To indicate a parent album Used in:
type="upload" parent="13"
Only album 13 and its (grand)children will be displayed in the upload album selection box, as far as the user has the rights to upload to these albums.
Used in:
type="acount" parent="13"
Prints the total number of (grand)childalbums of album number 13.
Used in:
type="pcount" parent="13"
Prints the total number of photos in all (grand)childalbums of album number 13.
Note that the parent album can only be a single album id number.

Types

Type Description Remarks
generic The default shortcode type This is the default type and generates a generic albums display: a list of album covers that have their parent set to ---none---, or the display as requested by the querystring that calls for the page involved.
Example: [wppa type="generic"]
landing Indicates a 'landing' area Same as generic, except that it only displays that what is requested in the querystring. Typically used on a landing page where the display occurs as a result of links from widgets.
Example: [wppa type="landing"]
cover Displays one ore more album covers The requested display type is the cover of an album. The album must be specified in the album attrubute.
Example: [wppa type="cover" album="2"]
Shortcode ReferenceSecond album
6
Views: 177880
Download album
album
content
Shows the content of an album album and content are aliases. Displays sub-album covers and thumbnail images of photos in the album as specified in the album attribute.
If the album contains both photos and sub-albums, the sub-album covers are displayed first. If you want the thumbnails to be shown first, tick the box in Advanced settings -> System -> i -> Item 24: Thumbs first

Example: [wppa type="content" album="4"]
thumbs Shows thumbnails Displays thumbnail images of photos in the album as specified in the album attribute.
Example: [wppa type="thumbs" album="4"]
1951
Silver medal
De drie jees.jpg (opajaap)
These boys are world famous in Holland Views: 15137 times
Rating: 3.75
1 comment
15137 views
23
HPIM0685.JPG (opajaap)
Where do i find anything to eat? Views: 11533 times
Rating: 4.00
11533 views
24
Silver medal
HPIM0687.JPG (opajaap)
What's up, doc? Views: 10574 times
Rating: 4.24
2 comments
10574 views
22
HPIM0691.JPG (opajaap)
Birds in the Blijdorp zoo Views: 9377 times
Rating: 3.20
9377 views
19
HPIM0696.JPG (opajaap)
This is the description of the photo named 'HPIM0696.JPG' It is taken in the Blijdorp zoo in Rotterdam.
This description is made extremely long, to test for an reported bug.
The user claims that the description is truncated somewhere in the popup window when it is very long. Well, we will see what happens now!
Rating: 3.20
8188 views
21
HPIM0727.JPG (opajaap)
Zwaan(tje), zwaan, zeg maar...
Zwaan, kleef aan.
Rating: 3.89
7787 views
8
Silver medal
HPIM1365.JPG (opajaap)
The big buddha in the garden in Maasbree Views: 15671 times
Rating: 3.91
2 comments
15671 views
671
Bronze medal
Papegaaien.jpg (opajaap)
This is a description
with Turkish characters. ? ü ? ç ö ? .4
Its Size is only 480 pixels in height.
Rating: 4.46
8170 views
covers Shows sub-album covers Displays sub-album covers in the album as specified in the album attribute.
Example: [wppa type="covers" album="2"]
Shortcode ReferenceSecond album

Child album

This is a child album
It's parent is "Second album"
12
Bronze medal
Views: 50644
Download album

Microscope

All these pictures are from the book 'Microcosmos', created by Brandon Brill from London.
1914
Views: 31776
Download album
slide Slideshow Displays a slideshow of the photos in the album as specified in the album attribute.
slideonly Simple slideshow A slideshow without supporting boxes.
slideonlyf Simple slideshow with filmstrip A slideshow with the filmstrip only.
filmonly A slideshow filmstrip only
Example: [wppa type="filmonly" album="4"]
24
22
19
21
8
671
1951
23
24
22
19
21
8
671
1951
23
24
22
19
21
photo A bare photo A single photo as specified by the photo attibute.
mphoto A wp-media type like photo A single photo displayed with the wp caption.
xphoto An extended wp-media type like photo A single photo displayed with an extended caption.
The extension can be: The rating when enabled in II-B7, The share buttons when enabled in II-C1 and/or The commentform when enabled in II-B10
slphoto Single photo slide A single photo in the style of a slideshow, but without navigations.
The following type specifications produce wppa+ supporting boxes rather than photo displays:
upload User upload box Creates a frontend upload box like the upload widget. An album spec can be given to restrict the uploads to the supplied album(s). If the visitor has no rights to upload here, the box will not be displayed.
multitag Creates a multitag selection box like the tags filter widget. An optional taglist spec can be given to restrict the tags shown, a cols spec to specify the number of columns. Example: [wppa type="multitag" taglist="Bird,Duck,Owl" cols="3"]
tagcloud Creates a tagcloud box like the tagcloud widget. An optional taglist spec can be given to restrict the tags shown. Example:
[wppa type="tagcloud" taglist="Bird,Duck,Owl"]
superview Creates a box with content like the superview widget.
search Creates a box with content like the search widget. Optional arguments: sub="1" to enable subsearch (search from within current results) and root="1" to enable rootsearch (search form current album and its sub albums). To start the search from a certain album root use root="#123", where 123 is the album id. Additionally the shortcode attribute landing="123" can be used to specify a landing page id (123 in this example).
calendar Displays a calendar. For more info see the calendar documentation page
Miscellaneous type specifications:
url An image url Returns the url of a specified photo id. Examples:
[wppa type="url" photo="4711"]
and
[wppa type="url" photo="#potd"]

Example use in template (php):
echo '<img src=".do_shortcode('[wppa type="url" photo="12"]')." />';
This is equivalent to
echo '<img src=".wppa_get_hires_url(12)." />';
but you can use photo="#potd" in the shortcode version.
Example use in page content:
<img src='[wppa type="url" photo="#potd"]' />
In real life:
Note the single quotes in the src attribute of img.
Another example:
<a href='[wppa type="url" photo="12"]' target="_blank" >Nice photo</a>
In real life: Nice photo
acount Prints the number of albums Examples:
type="acount" album="13" Prints the number of child-albums of album number 13.
type="acount" parent="13" Prints the total number of (grand)child-albums of album number 13.
Note that album and parent can only be a single album id number here.
pcount Prints the number of photos Examples:
type="pcount" album="13" Prints the number of photos in album number 13.
type="pcount" parent="13" Prints the total number of photos in all (grand)child-albums of album number 13.
Note that album and parent can only be a single album id number here.
share Shows the share box for the page/post Example:
[wppa type="share"] displays:
version Shows the version of wppa you run Example:
[wppa type="version"] prints: 8.5.02.005
lastupdate Shows the date of last upload in an album or systemwide when the album spec is omitted Example:
[wppa type="lastupdate" album="66"] prints: 8 February 2018

Album specifications

Album Description Remarks
Physical album specifications:
13 Album id The id of the album to be used for the type of display requested by the type attribute.
2.3.7.10 Emumeration An emumeration of album id's like 2.3.7.10
34..38 A range A range like 34..38. Make sure the first number is less than the second number.
2.6.8.19..24.7.58 A combo Any combination of enumaration(s) and range(s)
$albumname Album name preceeded by a $ sign

The name of the album to be used for the type of display requested by the type attribute. When using qTranslate make sure the name language matches the page language.
This method is discouraged, changing the name of the album will cause the album not being found
#last Last album The most recently added (youngest) album.
#last,0,1 Last modified The most recently modified album. This is most likely the album that has the most recently uploaded photo.
#last,p,k Last modified from parent The k most recently modified albums with parent album p, where p and k are positive integer numbers. These are most likely the albums that have the most recently uploaded photos. Parent p may also be an album name preceded by a $ sign.
#cat,cat1,cat2,cat3 Categories AND A list of physical albums that have the categories cat1 and cat2 and cat3. Can be used to display album covers or photos in any display type.
#cat,cat1;cat2;cat3 Categories OR A list of physical albums that have the categories cat1 or cat2 or cat3. Can be used to display album covers or photos in any display type.
Virtual album specifications:
#topten[,n[,m[,medals]]] A virtual album containing the highest rated photos.
May optionally include albumnumber (n, 0 for systemwide) and number of photos(m),
use 0 for the default as defined in the Settings admin page; add 3rd attribute medals to display only top photos with medals.
You can select the way the top photos are defined - by mean rating, rating count or view count - in Basic settings -> Rating -> I -> Item 32: Top criterium.
Example: [wppa type="thumbs" album="#topten,0,4,medals"]
Shortcode ReferenceTop rated photos
2223
Bronze medal
Aivazovsky-1835 (wl)
View of the Coast Near St. Petersburg
Camera info
Views: 2173 times
Rating: 4.83
2173 views
1900
Bronze medal
image01 (opajaap)
A wood or heathland Ant, Formica fusca, holding a microchip Views: 22950 times
Rating: 4.46
4 comments
22950 views
671
Bronze medal
Papegaaien.jpg (opajaap)
This is a description
with Turkish characters. ? ü ? ç ö ? .4
Its Size is only 480 pixels in height.
Rating: 4.46
8170 views
2309
Bronze medal
183836304.jpg (imranansari)
Camera info
Views: 419 times
Rating: 4.38
419 views
#lasten[,n[,m]] Recent A virtual album containing the most recently uploaded photos. May optionally include albumnumber (n, 0 for systemwide) and number of photos(m) if not the default as defined in the Settings admin page.
#comten[,n[,m]] Commented A virtual album containing the most recently commented photos. May optionally include albumnumber (n, 0 for systemwide) and number of photos(m) if not the default as defined in the Settings admin page.
#featen[,n[,m]] Featured A virtual album containing a random choice of featured photos. May optionally include albumnumber (n, 0 for systemwide) and number of photos(m) if not the default as defined in the Settings admin page.
#tags,tag1,tag2,tagn Tagged AND A virtual album containing photos that are tagged with tag1 and tag2 and tagn.
#tags,tag1;tag2;tagn Tagged OR A virtual album containing photos that are tagged with tag1 or tag2 or tagn.
#all All A virtual album containing all photos in the system.
#related[,tags|,desc[,nn]]
A virtual album containing photos that are related to the content of the page/post.
Specification: tags (default) or desc, and optional maximum number of photos to find ( nn ).
If tags is specified, wppa+ searches photos that have tag(s) equal to word(s) in the text of the page/post.
If desc is specified, the description of the photos is searched for words matching words in the page/post.
Example: [wppa type="thumbs" album="#related,tags,3"]
Shortcode ReferenceRelated photos
4630
Shortcode generator dialog (opajaap)
Shortcode generator dialog
90979 views
4629
Shortcode generator icon (opajaap)
Shortcode generator icon
92221 views
1904
image05 (opajaap)
Bacteria on the surface of a human tongue
Rating: 4.67
627 views

Example: [wppa type="thumbs" album="#related,desc,6"]
Shortcode ReferenceScreenshots
5032
Replace-by-upload-zip (Jaap Breetvelt)
Camera info

19 views
5031
Schermafbeelding 2023-05-09 130432 (Jaap Breetvelt)
Camera info

43 views
5029
Schermafbeelding 2023-03-24 110450 (Jaap Breetvelt)
19 views
5007
Ake (Jaap Breetvelt)
30 views
5005
Schermafbeelding 2022-11-03 121300 (Jaap Breetvelt)
.
40 views
5004
Screenshot_20221102-115251_Firefox (Jaap Breetvelt)
.
11 views
5003
Schermafbeelding 2022-11-02 115216 (Jaap Breetvelt)
.
9 views
5002
Manage email subscriptions (Jaap Breetvelt)
7 views
4999
Schermafbeelding 2022-08-19 111229 (Jaap Breetvelt)
23 views
4996
Schermafbeelding 2022-06-30 170848 (Jaap Breetvelt)
25 views
4995
Schermafbeelding 2022-06-07 183036 (Jaap Breetvelt)
13 views
4994
Photo description MCE editor (Jaap Breetvelt)
Camera info

13 views
4993
Album description MCE Editor (Jaap Breetvelt)
Camera info

9 views
4992
Widget activation is not admin (Jaap Breetvelt)
22 views
4991
Album delete at (Jaap Breetvelt)
14 views
4990
Schermafbeelding 2022-04-02 140917 (Jaap Breetvelt)
Camera info

16 views
4989
Schermafbeelding 2022-03-23 111541 (Jaap Breetvelt)
Camera info

8 views
4960
Album owner public (Jaap Breetvelt)
Album owner public
93 views
4939
widgetbug-5.8 (Jaap Breetvelt)
Camera info

30 views
4938
Wijzigen (Jaap Breetvelt)
Camera info

24 views
4937
Struktuur (Jaap Breetvelt)
Camera info

10 views
4916
Display options (Jaap Breetvelt)
Camera info

97 views
4912
176270 (Jaap Breetvelt)
Camera info

55 views
4904
Sidebar-slideshow-widget-screen (Jaap Breetvelt)
Camera info

73 views
4903
 FIRST 
Photo-descxription (Jaap Breetvelt)
Camera info

74 views
4901
Chrome-lb (opajaap)
Camera info

110 views
4900
Chrome (opajaap)
Camera info

57 views
4897
Shortcode generator Gutenberg-2 (opajaap)
Camera info

62 views
4896
Shortcode generator Gutenberg (opajaap)
Camera info

37 views
4889
Screenshot_2020-01-16-18-00-28 (opajaap)
Camera info

87 views
4881
Knipsel (opajaap)
Camera info

307 views
4877
JocobB-2 (opajaap)
Camera info

278 views
4876
JocobB (opajaap)
Camera info

229 views
4870
Photo tags (opajaap)
Camera info

235 views
4823
jasondeangelo (opajaap)
Camera info

449 views
4812
Cached-pages-2 (opajaap)
Camera info

198 views
4811
Cached-pages-1 (opajaap)
Camera info

153 views
4773
share-on-thumbs (opajaap)
Camera info

173 views
4768
bbpress-2 (opajaap)
Camera info

Rating: 4.00
3927 views
4767
bbpress-1 (opajaap)
Camera info

Rating: 3.00
126 views
4765
Upload-on-photo-shortcode-generator (opajaap)
Camera info

181 views
4754
bestof_lightbox (opajaap)
Camera info

138 views
4753
Lightbox_on_slideshow (opajaap)
Camera info

168 views
4747
Activity_feed_2 (opajaap)
Activity feed. New in version 6.7.06
237 views
4744
Activity_feed (opajaap)
Camera info

168 views
4743
Orientations-2 (opajaap)
Camera info

186 views
4742
Orientations-1 (opajaap)
Camera info

165 views
4741
Album-admin (opajaap)
Camera info

148 views
4727
bug-in-home_url (opajaap)
Camera info

106 views
4726
Search-layout (opajaap)
Camera info

95 views
4725
php7-compat (opajaap)
Camera info

94 views
4724
Video-admin (opajaap)
Camera info

111 views
4696
Moving-disk (opajaap)
Camera info

310 views
4695
Import-zip-6 (opajaap)
Camera info

145 views
4694
Import-zip-5 (opajaap)
Camera info

133 views
4693
Import-zip-4 (opajaap)
Camera info

125 views
4692
Import-zip-3 (opajaap)
Camera info

103 views
4691
Import-zip-2 (opajaap)
Camera info

86 views
4690
Import-zip-1 (opajaap)
Camera info

83 views
4689
Frontend-upload (opajaap)
Camera info

122 views
4687
Videoscreenshot (opajaap)
Camera info

90 views
4680
Supersearch (opajaap)
210 views
4679
Fundraising (opajaap)
148 views
4678
Page-source (opajaap)
168 views
4677
Tweet (opajaap)
129 views
4676
Page-with-sharelink (opajaap)
119 views
4675
Card-validator (opajaap)
100 views
4674
Twitter_card_validator (opajaap)
Camera info

113 views
4673
Twitter_actual_tweet (opajaap)
Camera info

101 views
4672
Qtranslate-flags (opajaap)
Camera info

125 views
4671
Uploader_photos (opajaap)
102 views
4670
Knipsel-authors-posts (opajaap)
124 views
4668
Hallelujah (opajaap)
4995 views
4654
Tagswithampersand (opajaap)
Camera info

156 views
4652
Photo-sequence (opajaap)
Camera info

125 views
4651
Logged_out_like (opajaap)
Camera info

96 views
4650
Copy-to-albums (opajaap)
Camera info

Rating: 5.00
123 views
4649
Filename (opajaap)
Camera info

107 views
4648
Wrong_shortcode (opajaap)
Camera info

81 views
4647
Album-photo-sequence-order (opajaap)
Camera info

92 views
4646
Cats-Pussies-Categories (opajaap)
Camera info

81 views
4645
New (opajaap)
Camera info

66 views
4644
Album_cover_linktype (opajaap)
Camera info

151 views
4637
Alt_error (opajaap)
Camera info

192 views
4635
HPIM4171 (opajaap)
Camera info

123 views
4631
HPIM4169 (opajaap)
Camera info

144 views
4626
Userphotos (opajaap)
Camera info

208 views
4610
Rating Dayly - Hour (opajaap)
Rating Dayly - Hour
Rating: 2.50
432 views
4603
Cottage (opajaap)
Cottage, 21 September 2016 11:46, https://wppa.nl/wp-content/uploads/wppa/4603.jpg
259 views
4597
Album search shortcoded generator (opajaap)
Camera info

195 views
4596
Invalid version (opajaap)
Rating: 4.00
246 views
3991
Twitter-image2.PNG (wppa-admin)
Camera info

409 views
3990
Twitter-image.PNG (wppa-admin)
Camera info

151 views
3989
Hans.png (wppa-admin)
Camera info

130 views
3988
Knipsel.PNG (wppa-admin)
Camera info

100 views
3971
On Firefox (wppa-admin)
Camera info

154 views
3970
On Chrome (wppa-admin)
Camera info

116 views
3969
On IE (wppa-admin)
Camera info

108 views
3965
Marcus-2.JPG (wppa-admin)
Camera info

165 views
3964
Marcus-1.JPG (wppa-admin)
Camera info

107 views
#owner,username[,parent] A virtual album containing all albums owned by username.
If parent is specified, only the sub-albums of that parent will be selected, if parent is omitted, only top-level albums owned by username.
This shortcode may show album covers (type="cover") or photos (type="album"). If username is #me, the currently logged in user is assumed.
Parent album may also be an album name preceeded by a $ sign or an enumeration of album numbers (e.g. 3.5.7..11).
Example: [wppa type="cover" album="#owner,#me,$Members"]
#upldr,username[,parent] A virtual album containing all photos uploaded by username.
If parent is specified, only the photos uploaded by the user out of the parent albums(s) and their sub-albums are shown.
If username is #me, the currently logged in user is assumed. Parent album may also be an album name preceeded by a $ sign or an enumeration of album numbers (e.g. 3.5.7..11).
Example: [wppa type="thumbs" album="#upldr,kimmy"]
Shortcode ReferencePhotos by Kimmy Breetvelt
4950
Bob-75 (Kimmy Breetvelt)
13 views