BP Profile Shortcodes Extra

July 23, 2024

BP Profile Shortcodes Extra Plugin

Insert Group, Follow, or User Profile details into a page or post, recreate many group and profile page options.

The ambition of this plugin is to provide all the shortcodes needed to create group and member profile dashboards using shortcodes. In addition is has wider features supporting general groups and member lists and the Activity “What’s New” form.

This is an extremely powerful plugin with many shortcode options allowing you to display a range of aspects from member profiles and groups.

This plugin now supports BP Follow, which although is out of date currently, I have a corrected version available for download. If the developers choose to update the plugin, their update will over-write the version that has been downloaded from BuddyPres User.

For the Block Editor support for shortcodes is either via blocks where appropriate or via the Classic block, from here you will see the BP Profile Shortcodes Extra dropdown menu to select the appropriate code. The classic editor does not render shortcodes as part of it’s preview capability currently, this may change as Gutenberg develops.

Profile Shortcodes

  • Displayname – As text or a link to the members profile page.

  • Username – As text or a link to the members profile page.

  • Avatar or Profile Image – As an image or a link to the members profile homepage.

  • Cover Image – As an image or a link to the members profile homepage.

  • Profile Header – A collection of cover image, avatar and username, with the username being a link to that members profile.

  • Profile Fields – You can display information from any of the profiles Xprofile fields.

  • Profile URL – shows the url, button or a link to user specific profile pages using the text of your choice.

  • Profile Edit Link – A link to the users edit profile page.

  • Profile Lists – Creates lists of users friends and groups and also lists of friend and group suggestions as well as general site member and group lists.

  • Private Message Link – displays a link to private message this selected user.

  • If no user_id is specified in the shortcode, the details of the member viewing that page will be displayed.

** Group Shortcodes**

  • Avatar Image – As an image or a link to the group homepage.

  • Cover Image – As an image or a link to the group homepage.

  • Profile Header – A collection of cover image, avatar and group name, with the group name being a link to that group homepage.

  • Group URL – shows the URL for the group or a link with the text specified by you.

  • Group Member list – shows either a collection of avatars or a list of members names, both are links to each members profile.

  • Group Description – displays the group description.

  • Group Field – displays various fields used by eac group.

** Activity Shortcodes

  • What’s New – adds the activity What’s New inut form to a page.

BP Profile Shortcodes Extra provides an updated range of BuddyPress shortcodes, it was build upon the BuddyPress Profile shortcodes plugin and supports all of it’s features plus many more.

Most of the shortcodes accept many parameters to allow the output to be customized and tailored to meet your needs.

The following shortcodes are available:

[bpps_profile_displayname]

  • Shows the display name.
  • Can have a parameter of user_id= to get it for a specific user.
  • Accepts user_id=”” for input.
  • If no user_id is specified then the logged in user id will be used.
  • If mention_name=”” is set the users mention name ( username ) is used.
  • If displayed=”Yes” then the displayed user id will be used. This will only work on BP pages.
  • If displayed=”Author” is used then the profile of the post author will be displayed. Only works on single posts and pages.
  • Accepts display_error=”No” argument to suppress the user not found error.

[bpps_profile_displayname user_id=”1″ class=”member-name”]

  • Displays the profile displayname for user id 1, the css class for that element will be set to “member-name”.

[bpps_profile_email]

  • Same as above except for the email.
  • The user_id parameter can be used optionally as well.
  • Accepts user_id=”” for input.
  • If no user_id is specified then the logged in user id will be used.
  • If displayed=”Yes” then the displayed user id will be used. This will only work on BP pages.
  • If displayed=”Author” is used then the profile of the post author will be displayed. Only works on single posts and pages.
  • If mention_name=”” is set the users mention name ( username ) is used.
  • Accepts error_msg=”” inorder to provide an alternative user not found message.
  • Accepts display_error=”No” argument to suppress the user not found error.

[bpps_profile_email user_id=”bob” ]

[bpps_profile_username]

  • Same as above except for the BuddyPress username
  • The user_id parameter can be used optionally as well.
  • Accepts user_id=”” for input.
  • If no user_id is specified then the logged in user id will be used.
  • If displayed=”Yes” then the displayed user id will be used. This will only work on BP pages.
  • If displayed=”Author” is used then the profile of the post author will be displayed. Only works on single posts and pages.
  • If mention_name=”” is set the users mention name ( username ) is used.
  • Accepts error_msg=”” inorder to provide an alternative user not found message.
  • Accepts display_error=”No” argument to suppress the user not found error.

[bpps_profile_private_message_link]

  • Returns a link to private message the user.
  • accepts user_id=”” as input.

[bpps_profile_url]

  • Will get the url for where the user’s profile is.
  • The user_id parameter can be used optionally as well.
  • IF you use show = no then it will show as a link.
  • You can use before = or after = parameters to define text to show before or after the link or before or after the text to add customization options.
  • This will accept the parameter “profile_page” to have the url for any page for the profile specified. i.e. “settings” will go to the settings page.
  • text=”name” will show the users displayname (“username” for WP Username ) as a link to their profile page. Otherwise any other text will be used as a as the text for the link.
  • Accepts user_id=”” text, button=”button”, before, profile_page, after, rel, target, style, class, attribute_id, title, tabindex, and attributes for inputs.
  • If no user_id is specified then the logged in user id will be used.
  • If displayed=”Yes” then the displayed user id will be used. This will only work on BP pages.
  • If displayed=”Author” is used then the profile of the post author will be displayed. Only works on single posts and pages.
  • If mention_name=”” is set the users mention name ( username ) is used.
  • Accepts error_msg=”” inorder to provide an alternative user not found message.
  • Accepts display_error=”No” argument to suppress the user not found error.

[bpps_profile_url text=”Link to Profile”]

  • Returns the link to the profile, the text specified is used as the anchor text.

[bpps_profile_url text=”Link to Profile” button=”button” ]

  • Returns the link to the profile as a button, the text specified is used as the anchor text.

[bpps_profile_url text=”My Forums” profile_page=”forums” user_id=”bob”]

  • Returns a link to Bob’s My forums page.

[bpps_profile_field field=”fieldname” tab=”section”]

  • Will get the field from the specified tab (profile group).
  • If the tab parameter is not used then it will get it from the primary / base tab profile group.
  • the user_id parameter can be used optionally as well.
  • The “field” would be the title and the “section” would be the tab / section.
  • The “shortcode” parameter, if set to 1 will assume the field holds a shortcode and will execute it.
  • The parameter “empty” will allow you to set what will show if the field is empty. Will return “Empty Text” by default.
  • Accepts user_id=””, field=”” empty=”” shortcode=”” tab=”” and option=”Two” for inputs.
  • If mention_name=”” is set the users mention name ( username ) is used.
  • If no user_id is specified then the logged in user id will be used.
  • If displayed=”Yes” then the displayed user id will be used. This will only work on BP pages.
  • If displayed=”Author” is used then the profile of the post author will be displayed. Only works on single posts and pages.
  • Accepts error_msg=”” inorder to provide an alternative user not found message.
  • Accepts display_error=”No” argument to suppress the user not found error.

  • There are now two different methods of displaying the users profile fields built into this shortcode:

** [bpps_profile_field tab=”Base” field=”Name”] uses the original method to display the profile field.
** [bpps_profile_field option=”Two” field=”Name”] uses the option two method to display the profile field.

[bpps_profile_field field=”Name” user_id=”2″]

  • Displays displays the Name field from the Base profile group for user 2.

[bpps_profile_field field=”Details” user_id=”bill” tab=”More”]

  • Displays the Details field from the More profile group for the user Bob.

[bpps_profile_avatar]

  • Displays the members profile image.
  • Can use the “dimension” parameter to change the dimensions of the avatar.
  • You can use a height or width parameter to define the height or width of it as an alternative.
  • The user_id parameter can be used optionally as well.
  • Accepts user_id=”” id, rel, style, class, attribute_id, dimension, height, width and alt inputs.
  • If no user_id is specified then the logged in user id will be used.
  • If mention_name=”” is set the users mention name ( username ) is used.
  • If displayed=”Yes” then the displayed user id will be used. This will only work on BP pages.
  • If displayed=”Author” is used then the profile of the post author will be displayed. Only works on single posts and pages.
  • Accepts error_msg=”” inorder to provide an alternative user not found message.
  • Accepts display_error=”No” argument to suppress the user not found error.

[bpps_profile_avatar_url]

  • Will get the profile/avatar image url.
  • The user_id parameter can be used optionally as well.
  • If you use show = no as a parameter it works similar to bp_profile_avatar.
  • Accepts user_id=”” as input.
  • If no user_id is specified then the logged in user id will be used.
  • If displayed=”Yes” then the displayed user id will be used. This will only work on BP pages.
  • If mention_name=”” is set the users mention name ( username ) is used.
  • If displayed=”Author” is used then the profile of the post author will be displayed. Only works on single posts and pages.
  • Accepts error_msg=”” inorder to provide an alternative user not found message.
  • Accepts display_error=”No” argument to suppress the user not found error.

[bpps_profile_avatar_link]

  • Will get the avatar image as a link to the members profile.
  • The user_id parameter can be used optionally as well.
  • If you use show = no as a parameter it works similar to bp_profile_gravatar.
  • Accepts user_id=”” id, profile_page, style, class, attribute_id, dimension, height, width and alt inputs.
  • If no user_id is specified then the logged in user id will be used.
  • If mention_name=”” is set the users mention name ( username ) is used.
  • If displayed=”Yes” then the displayed user id will be used. This will only work on BP pages.
  • If displayed=”Author” is used then the profile of the post author will be displayed. Only works on single posts and pages.
  • Accepts error_msg=”” inorder to provide an alternative user not found message.
  • Accepts display_error=”No” argument to suppress the user not found error.

[bpps_profile_cover_image]

  • Displays the members profile cover image.
  • You can use a height or width parameter to define the height or width.
  • The user_id parameter can be used optionally as well.
  • Accepts user_id=”” id, profile_page, rel, style, class, attribute_id, height, width and alt inputs.
  • If no user_id is specified then the logged in user id will be used.
  • If mention_name=”” is set the users mention name ( username ) is used.
  • If displayed=”Yes” then the displayed user id will be used. This will only work on BP pages.
  • If displayed=”Author” is used then the profile of the post author will be displayed. Only works on single posts and pages.
  • Accepts error_msg=”” inorder to provide an alternative user not found message.
  • Accepts display_error=”No” argument to suppress the user not found error.

[bpps_profile_cover_image_url]

  • Will get the profile cover image url.
  • The user_id parameter can be used optionally as well.
  • If you use show = no as a parameter it works similar to bp_profile_gravatar.
  • Accepts user_id=”” as input.
  • If no user_id is specified then the logged in user id will be used.
  • If mention_name=”” is set the users mention name ( username ) is used.
  • If displayed=”Yes” then the displayed user id will be used. This will only work on BP pages.
  • If displayed=”Author” is used then the profile of the post author will be displayed. Only works on single posts and pages.
  • Accepts error_msg=”” inorder to provide an alternative user not found message.
  • Accepts display_error=”No” argument to suppress the user not found error.

[bpps_profile_cover_image_link]

  • Will get the profile cover image as a link to the members profile.
  • The user_id parameter can be used optionally as well.
  • If you use show = no as a parameter it works similar to bp_profile_gravatar.
  • Accepts user_id=”” id, rel, style, class, attribute_id, height, width and alt inputs.
  • If no user_id is specified then the logged in user id will be used.
  • If mention_name=”” is set the users mention name ( username ) is used.
  • If displayed=”Yes” then the displayed user id will be used. This will only work on BP pages.
  • If displayed=”Author” is used then the profile of the post author will be displayed. Only works on single posts and pages.
  • Accepts error_msg=”” inorder to provide an alternative user not found message.
  • Accepts display_error=”No” argument to suppress the user not found error.

[bpps_profile_edit_url]

  • Will get the url for editing the user’s buddypress profile.
  • The user_id parameter can be used optionally as well.
  • You can use before = or after = parameters to define text to show before or after the link or before or after the text to add customizability.
  • Accepts user_id=”” id, style, and alt for inputs.
  • If no user_id is specified then the logged in user id will be used.
  • If mention_name=”” is set the users mention name ( username ) is used.
  • If displayed=”Yes” then the displayed user id will be used. This will only work on BP pages.
  • If displayed=”Author” is used then the profile of the post author will be displayed. Only works on single posts and pages.
  • Accepts error_msg=”” inorder to provide an alternative user not found message.
  • Accepts display_error=”No” argument to suppress the user not found …

Installation

Option 1.

  1. From the Admin>>Plugins>>Add New page, search for BP Profile Shortcodes Extra.
  2. When you have located the plugin, click on “Install” and then “Activate”.
  3. Edit your post or page to add the shortcodes

With the zip file:

Option 2

  1. Upzip the plugin into it’s directory/file structure
  2. Upload BP Profile Shortcodes Extra’s structure to the /wp-content/plugins/ directory.
  3. Activate the plugin through the Admin>>Plugins menu.
  4. Edit your post or page to add the shortcodes

Option 3

  1. Go to Admin>>Plugins>>Add New>>Upload page.
  2. Select the zip file and choose upload.
  3. Activate the plugin.
  4. Edit your post or page to add the shortcodes

Screenshots

  1. screenshot-1.png Profile Header shortcode output

    screenshot-1.png Profile Header shortcode output

  2. screenshot-2.png Profile List shortcode Group list outputs

    screenshot-2.png Profile List shortcode Group list outputs

  3. screenshot-3.png Profile List shortcode friends list outputs

    screenshot-3.png Profile List shortcode friends list outputs

  4. screenshot-4.png Profile List shortcode suggested groups list

    screenshot-4.png Profile List shortcode suggested groups list

  5. screenshot-5.png Profile List shortcode suggested groups avatar-list

    screenshot-5.png Profile List shortcode suggested groups avatar-list

Changelog

2.6.0

  • Upgrade: Profile_lists now supports Follower and Following lists and grids.
  • Improvements: Layour changes and HTML improvements.

2.5.5

*Fix: Group members shortcode now fixed.
*Update: translators comments added.
*Update: Updated escaping of attributes.

2.5.4

*Fix: replaced depricated functions.

2.5.3

*18/02/2024

  • Fix: Added input escaping to all shortcode user inputs.
  • Fix: Added is_numeric check to all numeric inputs
  • Fix: Ensured all outputs are escaped
  • Fix: Added additional validation for all requested group ID’s
  • Fix: Added additional validation for all requested user ID’s
  • Fix: All links now include nonce checks

2.5.2

  • 13/05/2019

  • Fix: Moved group members title to it’s own div with a class of bpse-group-members-title.

2.5.1

  • 07/05/2019

  • New: Provided additional profile field data items in bpps_group_members.

2.4.1

  • 07/05/2019

  • Fix: Prevent avatar links showing ‘image’ instead of ‘profie’.

2.4.0

  • 13/04/2019

  • New: Added the ability to use the mention name as a selector for the profile based shortcodes.

2.3.5

  • 11/04/2019

  • New: Added French translation, thanks to Bruno Verrier.

2.3.4

  • 15/03/2019

  • Fix: Corrected error preventing custom error message from showing.

2.3.3

  • 15/03/2019

  • New: Added error_msg=”” to most of the profile shortcodes.

2.3.2

  • 14/03/2019

  • Fix: corrected error with $user_id in profile message link.

2.3.1

  • 13/03/2019

  • Fix: Removed hard-coding of avatar size, set default to 90 px.

2.3.0

  • 16/02/2019

  • New: Added group-lists list type to the profile lists shortcode.

2.2.0

  • New: Added members list type to the profile lists shortcode.

2.1.0

  • Fix: Corrected error with per_page options in profile lists shortcode.
  • New: Introduced option=”avatar-grid-name” for profile lists shortcode.

2.0.0

  • 12/02/2019

  • New: Added bpps_group_field shortcode.

1.9.3

  • 19/01/2019

  • Fix: Corrected error with profile field shortcode.

1.9.2

  • 18/01/2019

  • New: Added support for pages with Author option

1.9.1

  • 18/01/2019

  • Fix: Corrected typos in if statements, refactored author_id function.

1.9.0

  • 17/01/2019

  • New: Added displayed=”Author” feature to profile shortcodes to allow links to be created between post authors and their BP Profiles.

1.8.0

  • 08/01/2019

  • New: revamped What’s New shortcode to include template pages for both the Nouveau and Legacy What’s New Shortcode.

  • New: introduced BPPSE specific action filters for template pages.

1.7.6

  • 08/01/2019

  • Fix: added before and after to What’s New shortcode. (Depricated).

1.7.5

  • 07/01/2019

  • Fix: corrected error with username check in profile_url

1.7.4

  • 05/01/2019

  • New: added display_error option on Profile Shortcodes to suppress the “User not Found” error message.

1.7.3

  • 23/12/2018

  • Fix: Added isset test for group_id to prevent non object error.

  • Fix: Whats New now works with BP Nouveau.

1.7.2

  • 17/12/2018

  • Fix: corrected typo in readme file.

  • New: Added ability to auto detect group in group members shortcode.

1.7.1

  • 09/12/2018

  • Fix: Updated Blocks to work with WP 5.0.

1.6.2

  • 05/12/2018

  • New: Added displayed user id functionality.

1.6.1

  • 04/12/2018

  • New – Profile Field now supports Radio button created arrays for output.

1.6.0

  • 29/11/2018

  • New: Added group description shortcode

1.4.5

  • 16/10/2018

  • Fix: removed 1.4.4 change

1.4.4

  • 16/10/2018

  • Fix: more refined fix for quotes filters.

1.4.3

  • 15/10/2018

  • Fix: remove_filter(‘the_content’, ‘wptexturize’); added to prevent quotes being converted by this filter in Visual tab.

1.4.2

  • 07/06/2018

  • Fix: Corrected link for profile edit url.

1.4.1

  • 03/06/2018

  • Fix: Added attribute support for button.

1.4.0

  • 02/06/2018

  • New: Added button=”button” feature to [bpps_profile_url] shortcode to display a button.

1.0.0

  • 08/04/2018

Added Profile Lists shortcode with options for Group or Friends lists.

Added Group shortcodes – Avatar, URL, Cover-Image, Member List and Header.

Added Profile Cover Image Shortcodes.

Added Profile Header Shortcodes.

Fixed Class Constructor deprecation notice.

Fixed profile fields username is_string() condition error.
= Added error checking for instances of no valid username supplied.

Details

  • Version: 2.6.0
  • Active installations: 1,000
  • Tested up to: 6.6.1

Ratings


5 Stars
4 Stars
3 Stars
2 Stars
1 Stars