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 specified post ID in the argument.
Default attributes:
- 'post_id' => {current post ID}
Example:
[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
Default attributes:
- 'user_id' => {current user ID}
Example:
[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.
Default attribute:
- 'user_id' => {current user ID}
Example:
[um_user_bookmarks_all]
PHP example:
echo do_shortcode( '[um_user_bookmarks_all user_id="' . get_current_user_id() . '"]' );