BuddyDev

Search

Adding notification counter to

  • Participant
    Level: Yogi
    Posts: 1105
    calu on #43242

    Hi there, I’m using this code to add a notification bell in my inside-header with a hook element, but I need to add the notification counter as well.

    Can you help?

    Regards
    Carsten

    ´<svg xmlns=”http://www.w3.org/2000/svg&#8221; width=”24″ height=”24″ fill=”currentColor” class=”bi bi-bell”viewBox=”0 0 16 16″><path d=”M8 16a2 2 0 0 0 2-2H6a2 2 0 0 0 2 2zM8 1.918l-.797.161A4.002 4.002 0 0 0 4 6c0 .628-.134 2.197-.459 3.742-.16.767-.376 1.566-.663 2.258h10.244c-.287-.692-.502-1.49-.663-2.258C12.134 8.197 12 6.628 12 6a4.002 4.002 0 0 0-3.203-3.92L8 1.917zM14.22 12c.223.447.481.801.78 1H1c.299-.199.557-.553.78-1C2.68 10.2 3 6.88 3 6c0-2.42 1.72-4.44 4.005-4.901a1 1 0 1 1 1.99 0A5.002 5.002 0 0 1 13 6c0 .88.32 4.2 1.22 6z”/></svg>´

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2934
    Ravi on #43278

    Hello Carsten,

    Thank you for posting here. Please contact your theme author he can help you in a better way with the issue.

    Regards
    Ravi

  • Participant
    Level: Yogi
    Posts: 1105
    calu on #43282

    Hi Ravi, thanks for your reply, it’s not the integration in my theme, I need help for, but a shortcode to display the notification counter, similar to the one I have for messages to show the counter next to my messages svg: ´

    [bp_better_messages_unread_counter hide_when_no_messages=”1″ preserve_space=”1″]

    I saw this example for the notification widget, and it’s a code like this I need, but this one is only working with the widget.

    https://buddydev.com/buddypress-notification-widget-shortcode-integration/

    [buddydev_bp_notification show_count_in_title=1 show_clear_notification=0]

    I hope this clarifies, and you can help, thanks.

    Regards
    Carsten

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2934
    Ravi on #43501

    Hello Carsten,

    Thank you for the acknowledgment. I have checked the Shortcode on my local development server and it is working fine for me. The Shortcode is correctly showing the notifications as well as the list of notifications when I have added it to a page.

    Please check the screenshot:
    https://www.awesomescreenshot.com/image/22787850?key=c4e7b181b1abf7d0df4751fa39f42e3f

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: not resolved