BuddyDev

BuddyPress notification widget shortcode integration

Are you looking for a shortcode to list BuddyPress notifications? Today, with the update to the BuddyPress Notifications Widget plugin, you can use shortcodes to list notifications too.

With the new update, you can use both the widgets and/or the shortcode to list the BuddyPress notifications.

How to use the shortcode?

You can use the shortcode '[buddydev_bp_notification]' to list notifications. The shortcode allows the following options.

Shortcode options:-

  • title:- This attribute allows site admin to give custom heading to the notification listing section.
  • link_title:- It allows the site admin to link the title with the user notification tab. Possible values are 0 and 1.
  • show_count: – This attribute allows the site admin to message how many notifications are there for the user. Possible values are 0 and 1.
  • show_count_in_title:- This attribute allows site admin to notification count with the title. Possible values are 0 and 1.
  • show_list:- This attribute allows the site admin to show a list of notifications. Possible values are 0 and 1.
  • show_clear_notification:- Show clear notification link: This attribute allows the site admin to show a custom button to clear all notifications at once. Possible values are 0 and 1.
  • show_empty:- This attribute allows the site admin to show a message if no notification is there for the user. Possible values are 0 and 1.

Examples:-

Example 1:- List all notification

BuddyPress notification widget shortcode integration
Example 2:- List only title of the section(no notification list)

BuddyPress notification widget shortcode integration
 Example 3:- Show count in title and show clear notifications

BuddyPress notification widget shortcode integration
That's it. Enjoy.

Comments are closed.