User Photos shortcodes

Overview

This document provides instructions on how to use shortcodes of the extension User Photos.

Ultimate Member uses WordPress shortcodes to allow users to perform certain actions as well as display forms and templates. You may use shortcodes in the posts(page) content and text widgets.

Shortcodes

[ultimatemember_albums] - Show all albums of all members

[ultimatemember_gallery] - Show member's block "Albums"

[ultimatemember_gallery_photos] - Show member's block "Photos"

[ultimatemember_albums] #

This shortcode shows all albums of all members.

Attributes

Key Type Default Description
column integer 2 A number of columns in the grid. Accepts 1, 2, 3, 4.
page integer 1 Default screen (influence on pagination).
per_page integer 12 A quantity of albums in one screen.

Example - Display 6 albums in 3 columns.

[ultimatemember_albums column="3" per_page="6"]

How to change template: copy file /wp-content/plugins/um-user-photos/templates/albums.php to /wp-content/themes/YOUR_THEME/ultimate-member/um-user-photos/albums.php and edit new file if you want to change this template.

This shortcode shows member's albums. This is the content of the Albums subtab in the Photos profile tab.

Attributes

Key Type Default Description
user_id integer Current profile ID (on profile page) or current user ID The user ID.

Example - Display current user albums.

[ultimatemember_gallery]

How to change template: copy file /wp-content/plugins/um-user-photos/templates/gallery.php to /wp-content/themes/YOUR_THEME/ultimate-member/um-user-photos/gallery.php and edit new file if you want to change this template.

This shortcode shows member's photos. This is the content of the Photos subtab in the Photos profile tab.

Attributes

Key Type Default Description
user_id integer Current profile ID (on profile page) or current user ID The user ID.

Example - Display current user photos.

[ultimatemember_gallery_photos]

How to change template: copy file /wp-content/plugins/um-user-photos/templates/photos.php to /wp-content/themes/YOUR_THEME/ultimate-member/um-user-photos/photos.php and and edit new file if you want to change this template.