BuddyDev

BuddyPress notification widget shortcode integration

Are you looking for a shortclode to list BuddyPress notifications? Today, with the update to BuddyPress Notifications Widget plugin, you can use shortcode 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 following options.

Shortcode options:-

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

Examples:-

Example 1:- List all notification


Example 2:- List only title of the section(no notification list)


 Example 3:- Show count in title and show clear notifications


That’s it. Enjoy.

Leave a Reply

Are you looking for support?

Please ask support questions in BuddyDev Forum and help us serve you better. Please use comment for general discussion/feature suggestions.

Your email address will not be published. All the fields marked as * are required.

If you are posting code, please use <pre> { Your Code Block } </pre>. Example:- <pre> echo $name; </pre>

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">


Subscribe