User Bookmarks shortcodes

Overview

This document provides instructions on how to use shortcodes and patterns of the extension User Bookmarks.

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

[um_bookmarks_button] #

This shortcode displays the "Bookmark" button or the "Remove bookmark" button on the singular post or for the specified post ID in the argument.

Attributes

Key Type Default Description
post_id integer Current post ID The post/page ID.

Example - Display bookmark button.

[um_bookmarks_button]

PHP example

echo do_shortcode( '[um_bookmarks_button post_id="' . get_the_ID() . '"]' );

[um_user_bookmarks] #

This shortcode displays the "Bookmarks" block content with folders (if they are enabled) except for the bookmarked User Profiles.

Attributes

Key Type Default Description
user_id integer Current user ID The user ID.

Example - Display bookmark folders.

[um_user_bookmarks]

PHP example

echo do_shortcode( '[um_user_bookmarks user_id="' . get_current_user_id() . '"]' );

[um_user_bookmarks_all] #

This shortcode displays all user bookmarks without folders except for the bookmarked User Profiles. If no user id is entered or the user id is empty, it will display all of the current user's bookmarks except the bookmarked users' profiles.

Attributes

Key Type Default Description
user_id integer Current user ID The user ID.

Example - Displays all user bookmarks.

[um_user_bookmarks_all]

PHP example

echo do_shortcode( '[um_user_bookmarks_all user_id="' . get_current_user_id() . '"]' );