Shortcode Reference

 

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

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][/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" ...][/wppa] 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
AttrubteDescriptionRemarks
typeThe type of the displayDefault: generic, see the table of types
albumThe album spicificationSee the table of album specifications
photoThe photo specificationSee the table of photo specifications
sizeThe 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.
alignThe horizontal alignmentCan 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.
taglistTags to useUsed in:
type="multitag" taglist="tag1,tag2,tag3..."
and
type="tagcloud" taglist="tag1,tag2,tag3..."
colsNumber of columnsUsed in:
type="multitag" cols="3" for 3 columns
cols="6,2" for 6 columns on pc and 2 on mobile devices
subEnable subsearchUsed in:
type="search" sub="1"
Equivalent to the corresponding widget option
rootEnable rootsearchUsed in:
type="search" root="1"
Equivalent to the corresponding widget option
calendarSpecify calendar typeUsed in:
type="calendar" calendar="timestamp"
Possible options: 'exifdtm', 'timestamp', 'modified'.
allSpecifies that all days are initially openedUsed in:
type="calendar" all="1"
Use of this option is strongly discouraged!
reverseSpecifies 'last day first'Used in:
type="calendar" reverse="1"
landingSpecifies search landing pageUsed in:
type="search" landing="1234"
adminSpecifies 'admins choice' usersUsed in:
type="choice" admin="admin,opa-jaap,pietje"
parentTo indicate a parent albumUsed 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.
altA photo if the shortcode can not be displayedThe 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"][/wppa]

Table of types
TypeDescriptionRemarks
genericThe default shortcode typeThis 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"][/wppa]
landingIndicates a 'landing' areaSame 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"][/wppa]
coverDisplays one ore more album coversThe requested display type is the cover of an album. The album must be specified in the album attrubute.
Example: [wppa type="cover" album="2"][/wppa]
Shortcode Reference Second album

Second album

Zomaar een ander album
Je kan hier zelfs een link hebben!
2284
Vues : 129438
Télécharger album
album
content
Shows the content of an albumalbum 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"][/wppa]
thumbsShows thumbnailsDisplays thumbnail images of photos in the album as specified in the album attribute.
Example: [wppa type="thumbs" album="4"][/wppa]
coversShows sub-album coversDisplays sub-album covers in the album as specified in the album attribute.
Example: [wppa type="covers" album="2"][/wppa]
Shortcode Reference Second album
slideSlideshowDisplays a slideshow of the photos in the album as specified in the album attribute.
slideonlySimple slideshowA slideshow without supporting navigation boxes.
slideonlyfSimple slideshow with filmstripA slideshow with the filmstrip only.
filmonlyA slideshow filmstrip onlyExample:
[wppa type="filmonly" album="4"][/wppa]
24
22
19
21
8
671
1951
23
24
22
19
21
8
671
1951
23
24
22
19
21
photoA bare photoA single photo as specified by the photo attibute.
mphotoA wp-media type like photoA single photo displayed with the wp caption.
xphotoAn extended wp-media type like photoA 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
slphotoSingle photo slideA single photo in the style of a slideshow, but without navigations.
The following type specifications produce wppa+ supporting boxes rather than photo displays:
uploadUser upload boxCreates 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.
multitagCreates 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"][/wppa]
tagcloudCreates 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"][/wppa]
superviewCreates a box with content like the superview widget.
searchCreates 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:
urlAn image urlReturns the url of a specified photo id. Examples:
[wppa type="url" photo="4711"][/wppa]
and
[wppa type="url" photo="#potd"][/wppa]

Example use in template (php):
echo '<img src=".do_shortcode('[wppa type="url" photo="12"][/wppa]')." />';
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"][/wppa]' />
In real life:
Note the single quotes in the src attribute of img.
Another example:
<a href='[wppa type="url" photo="12"][/wppa]' target="_blank" >Nice photo</a>
In real life: Nice photo
acountPrints the number of albumsExamples:
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.
pcountPrints the number of photosExamples:
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.
shareShows the share box for the page/postExample:
[wppa type="share"][/wppa] displays:
Partager sur Pinterest
Partager sur Google+
versionShows the version of wppa you runExample:
[wppa type="version"][/wppa] prints: 7-0-00-016

Table of album specifications
AlbumDescriptionRemarks
Physical album specifications:
13Album idThe id of the album to be used for the type of display requested by the type attribute.
2.3.7.10EmumerationAn emumeration of album id's like 2.3.7.10
34..38A rangeA range like 34..38. Make sure the first number is less than the second number.
2.6.8.19..24.7.58A comboAny combination of enumaration(s) and range(s)
$albumnameAlbum 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
#lastLast albumThe most recently added (youngest) album.
#last,0,1Last modifiedThe most recently modified album. This is most likely the album that has the most recently uploaded photo.
#last,p,kLast modified from parentThe 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,cat3Categories ANDA 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;cat3Categories ORA 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"][/wppa]
Shortcode Reference Photos les mieux notées
2223
Médaille de bronze
Aivazovsky-1835 (wl)
View of the Coast Near St. Petersburg
Camera info
Views: 1744 times
Vote: 4.83
1744 vus
671
Médaille de bronze
Papegaaien.jpg (Jaap Breetvelt)
This is a description
with Turkish characters. ? ü ? ç ö ? .4
Its Size is only 480 pixels in height. Views: 5951 times
https://wppa.nl/wp-content/wppa-pl/Album-4/HPIM0697-1.JPG
Vote: 4.80
5951 vus
1900
Médaille de bronze
image01 (Jaap Breetvelt)
Ambtenaar die een automatiseringsprobleem gaat oplossen! Views: 22802 times
https://wppa.nl/wp-content/wppa-pl/Microscope/image01.png
Vote: 4.50
4 commentaires
22802 vus
1905
Médaille d'or
image06 (Jaap Breetvelt)
Human sperm (spermatozoa), the male sex cells Views: 323 times
https://wppa.nl/wp-content/wppa-pl/Microscope/image06.png
Vote: 4.50
6 commentaires
323 vus
#lasten[,n[,m]]RecentA 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]]CommentedA 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]]FeaturedA 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,tagnTagged ANDA virtual album containing photos that are tagged with tag1 and tag2 and tagn.
#tags,tag1;tag2;tagnTagged ORA virtual album containing photos that are tagged with tag1 or tag2 or tagn.
#allAllA 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"][/wppa]
Shortcode Reference Photos apparentées
4630
Shortcode generator dialog (Jaap Breetvelt)
Shortcode generator dialog
21604 vus
4629
Shortcode generator icon (Jaap Breetvelt)
Shortcode generator icon
21601 vus
#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"][/wppa]
#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"][/wppa]
Shortcode Reference Photo de Kimmy Breetvelt Photo de Kimmy Breetvelt
Note moyenne  1 2 3 4 5f
Ma note d12345
4669
4656
4655
4624
4623
4622
4824
4750
4710
4705
4704
4703
4702
4669
4656
4655
4624
4623
4622
4824
4750
4710
4705
4704
4703

Table of photo specifications
PhotoDescriptionRemarks
4711A numberThe id of the photo to be displayed
$photonameThe photo name preceeded by a $ signThe name of the photo to be displayed. When using qTranslate make sure the name language matches the page language.
#lastLast photoThe most recently added photo
#potdPhoto of the dayThe 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.