Shortcode Reference

 

To get familiar with wppa shortcodes: first try the shortcode generator: (this example is in the classic editor, the block editor has the icons in the Add block menu

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!

Table of 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 when Table I-A1 is set to auto
size="450" to get a display of 450 pixels wide. This is the default when Table I-A1 is set to 450
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'.
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.
alt A photo if the shortcode can not be displayed The alt attrinute may conatin an existing photo id number. In case the shortcode can not be rendered, you will see the 'placeholder' [WPPA+ Photo display (fsh)].
In some circumstances this is not due to a configuration issue, but you can e.g. have plugin AMP installed and AMP applies to the content.
When the alt attribute is added to the shortcode, a plain photo will be displayed. If you do not want anything to be displayed (no photo and no errormessage) set the alt attribute to none: alt="none". Full shortcode example: [wppa type="slide" album="255" alt="4187"]

Table of 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 Reference Second album

Second album

Zomaar een ander album
Je kan hier zelfs een link hebben!
6
Visa: 142552
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 Table IV-A20: 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"]
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 Reference Second album

Child album

This is a child album
It's parent is "Second album"
12
Visa: 38718
Download Album

Microscope

All these pictures are from the book 'Microcosmos', created by Brandon Brill from London.
1914
Visa: 31420
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 navigation 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).
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:
Dela på Twitter
Dela på Google+
version Shows the version of wppa you run Example:
[wppa type="version"] prints: 7.3.10.001

Table of 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 - bhy mean rating, rating count or view count - in Table IV-E17.
Example:
[wppa type="thumbs" album="#topten,0,4,medals"]
Shortcode Reference Toppnoterade foton
2223
Bronsmedalj
Aivazovsky-1835 (wl)
View of the Coast Near St. Petersburg
Camera info
Views: 1907 times
Betyg: 4.83
1907 views
1900
Bronsmedalj
image01 (Jaap Breetvelt)
Ambtenaar die een automatiseringsprobleem gaat oplossen! Views: 22832 times
https://wppa.nl/wp-content/wppa-pl/Microscope/image01.png
Betyg: 4.46
4 comments
22832 views
671
Bronsmedalj
Papegaaien.jpg (Jaap Breetvelt)
This is a description
with Turkish characters. ? ü ? ç ö ? .4
Its Size is only 480 pixels in height. Views: 7950 times
https://wppa.nl/wp-content/wppa-pl/Album-4/HPIM0697-1.JPG
Betyg: 4.42
7950 views
2309
Bronsmedalj
183836304.jpg (imranansari)
Camera info
Views: 330 times
Betyg: 4.38
330 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 Reference Screenshots for docs
4880
Cropping_image (Jaap Breetvelt)
Cropping_image
1260 views
4879
Cropped_image (Jaap Breetvelt)
Cropped_image
1253 views
4862
Uploadscreen (Jaap Breetvelt)
Uploadscreen
1851 views
4848
Notify widget for moderators (Jaap Breetvelt)
Notify widget for moderators
1999 views
4847
Notify widget for logged-in users (Jaap Breetvelt)
Notify widget for logged-in users
1980 views
4846
Email configuration (Jaap Breetvelt)
Email configuration
Betyg: 3.00
2007 views
4829
Lightbox-realsize (Jaap Breetvelt)
Lightbox-realsize
2825 views
4828
Lightbox-clipped (Jaap Breetvelt)
Lightbox-clipped
2777 views
4827
Lightbox-stretched (Jaap Breetvelt)
Lightbox-stretched
2770 views
4826
Lightbox-padded (Jaap Breetvelt)
Lightbox-padded
2769 views
4825
Lightbox-normal (Jaap Breetvelt)
Lightbox-normal
2685 views
4736
Search-selboxes (Jaap Breetvelt)
The configuration of the search selection boxes
3374 views
4698
Import-ngg-2 (Jaap Breetvelt)
The actual import from ngg gallery screen
3807 views
4697
Import-ngg-1 (Jaap Breetvelt)
Select Nexgen gallery to import here
3808 views
4667
ImageMagic-screenshot-9 (Jaap Breetvelt)
The Paint version
3929 views
4666
ImageMagic-screenshot-8 (Jaap Breetvelt)
Sepia version
3925 views
4665
ImageMagic-screenshot-7 (Jaap Breetvelt)
Black and white version
3919 views
4664
ImageMagic-screenshot-6 (Jaap Breetvelt)
The horizon corrected
3918 views
4663
ImageMagic-screenshot-5 (Jaap Breetvelt)
The horizon guidline displayed
3913 views
4662
ImageMagic-screenshot-0 (Jaap Breetvelt)
Activating ImageMagick in wppa
3905 views
4661
ImageMagic-screenshot-1 (Jaap Breetvelt)
The original photo in the photo admin page
3905 views
4660
ImageMagic-screenshot-2 (Jaap Breetvelt)
The photo 180° rotated
3906 views
4659
ImageMagic-screenshot-3 (Jaap Breetvelt)
The ImageMagic command stack
3907 views
4658
ImageMagic-screenshot-4 (Jaap Breetvelt)
Horizon manipulation buttons
3896 views
4657
ImageMagic-example (Jaap Breetvelt)
The original photo
3897 views
4630
Shortcode generator dialog (Jaap Breetvelt)
Shortcode generator dialog
39725 views
4629
Shortcode generator icon (Jaap Breetvelt)
Shortcode generator icon
39722 views
4625
Database download links (Jaap Breetvelt)
Database download links
5646 views
4621
Edit_photo_6.6.00 (Jaap Breetvelt)
Photo Albums -> Album Admin admin page: Sub-albums sequence ordering and start of edit photo section
5333 views
4620
Edit_album_6.6.00 (Jaap Breetvelt)
Photo Albums -> Album Admin admin page: Edit album information
5312 views
4602
Navigation symbol urls 3 (Jaap Breetvelt)
Navigation symbol urls 3
66 views
4601
Navigation symbol urls 2 (Jaap Breetvelt)
Navigation symbol urls 2
1319 views
4600
Navigation symbol urls 1 (Jaap Breetvelt)
Navigation symbol urls 1
1319 views
4599
WPPA Photo Source files directory path 2 (Jaap Breetvelt)
WPPA Photo Source files directory path 2
3921 views
4598
WPPA Photo Source files directory path 1 (Jaap Breetvelt)
WPPA Photo Source files directory path 1
3914 views
4595
Potd-2 (Jaap Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Screenshots-for-docs/Potd-2.PNG
107 views
4594
Potd-1 (Jaap Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Screenshots-for-docs/Potd-1.PNG
92 views
4593
Inställningar (Jaap Breetvelt)
Photo Albums -> Settings
4680 views
4592
Initial setup Table 0 (Jaap Breetvelt)
Initial setup: Table O
4656 views
4591
Comment admin (Jaap Breetvelt)
Photo Albums -> Comments
5083 views
4590
Moderate photo status (Jaap Breetvelt)
Photo Albums -> Moderate Photos: Photo status
4138 views
4589
Moderate page (Jaap Breetvelt)
Photo ALbums -> Moderate Photos
4134 views
4588
Moderera kommentar (Jaap Breetvelt)
Photo Albums -> Moderate Photos: Comment status
4130 views
4260
Multisite-misconfig (wppa-admin)
Message indication you need to configure multisite type for WPPA+
5879 views
4259
Scripts obsolete (wppa-admin)
Posts and pages that contain depricated wppa scripts
6564 views
4255
Import-4 (wppa-admin)
Photo Albums -> Import Photos admin page
4981 views
4254
Import-3 (wppa-admin)
Photo Albums -> Import Photos admin page after completion of Ajax import
4983 views
4246
Import-2 (wppa-admin)
Photo Albums -> Import Photos admin page with photofiles in your depot
4983 views
4245
Upload-BC (wppa-admin)
Photo Albums -> Upload Photos admin page
2857 views
4244
Upload-A (wppa-admin)
Photo Albums -> Upload Photos admin page
2858 views
4243
Importera (wppa-admin)
Photo Albums -> Import Photos admin page
4983 views
4240
Settings-VII-A (wppa-admin)
Photo Albums -> Settings admin page Table VII-A
5425 views
4238
Album-admin-Seq (wppa-admin)
Photo ALbums -> Album Admin admin page: Sequence edit photo section
5607 views
4237
Album-admin-Bulk (wppa-admin)
Photo Albums -> Album Admin admin page: Bulk edit photo section
5614 views
4236
Album-admin-5 (wppa-admin)
Photo Albums -> Album Admin admin page: Sub-albums sequence ordering and start of edit photo section
5612 views
4235
Album-admin-4 (wppa-admin)
Photo Albums -> Album Admin admin page: Edit album information
5606 views
4234
Album-admin-3 (wppa-admin)
Photo Albums -> Album Admin admin page: Top-level albums sequence ordering
5605 views
4233
Album-admin-2 (wppa-admin)
Photo Albums -> Album Admin admin page: Collapsable table of albums
5600 views
4232
Album-admin-1 (wppa-admin)
Photo Albums -> Album Admin admin page: Flat table of albums
5605 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 Reference Bilder av Kimmy Breetvelt
4861
Flower-61086 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Bloemen/Flower-61086.jpg
172 views
4857
Flower-50126 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Bloemen/Flower-50126.jpg
155 views
4856
Flower-55530 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Bloemen/Flower-55530.jpg
145 views
4855
Flower-51862 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Bloemen/Flower-51862.jpg
108 views
4854
Flower-50916 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Bloemen/Flower-50916.jpg
100 views
4824
0005 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Mijn-subsub/0005.JPG
151 views
4750
20171002_154932 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Mijn-subsub/20171002_154932.jpg
114 views
4710
HPIM2496 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

Betyg: 5.00
132 views
4705
HPIM2828 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/My-sub-album/HPIM2828.JPG
1 comment
149 views
4704
HPIM2501 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/My-sub-album/HPIM2501.JPG
72 views
4703
HPIM2499 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/My-sub-album/HPIM2499.JPG
64 views
4702
HPIM2484 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/My-sub-album/HPIM2484.JPG
60 views
4669
HPIM2485 (Kimmy Breetvelt)
Wie:Me
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Kimmy-Breetvelt/HPIM2485.JPG
106 views
4656
HPIM2501 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Kimmy-Breetvelt/HPIM2501.JPG
70 views
4655
HPIM2495 (Kimmy Breetvelt)
Wie:
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Kimmy-Breetvelt/HPIM2495.JPG
81 views
4624
HPIM2539 (Kimmy Breetvelt)
Wie:Me with my friend Pasja
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Kimmy-Breetvelt/HPIM2539.JPG
154 views
4623
Kimmy_pixel (Kimmy Breetvelt)
Wie:Me, playing with my YMCK pixel
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Kimmy-Breetvelt/Kimmy_pixel.JPG
136 views
4622
Kimmy (Kimmy Breetvelt)
Wie:Me, when i was still very young
Wat:
Waar:
Wanneer:
Camera info

https://wppa.nl/wp-content/wppa-pl/Kimmy-Breetvelt/Kimmy.JPG
130 views

Table of photo specifications
Photo Description Remarks
4711 A number The id of the photo to be displayed
$photoname The photo name preceeded by a $ sign The name of the photo to be displayed. When using qTranslate make sure the name language matches the page language.
#last Last photo The most recently added photo
#potd Photo of the day The photo of the day as defined by the settings on the Photo ALbums -> Photo of the day admin page

Remark: If the type of display is set to a slideshow type, you can supply both an album and a photo. In this case the slideshow will start at the specified photo. The photo must be in the album, and the slideshow should be set to start still at first for this to have effect.