Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to change title bar on new notifications

  • @chatty24

    Participant

    Hey,

    I want to change the title bar of the current page (page where the user currently is) to something like ‘You Have New Notifications!’ or ‘You Have 2 New Notifications!’

    and if user has 0 new notification then it should return the original page title.

    How can I achieve this. And it would be great if this could be in real time (without reloading the page) as my notification are also in real time.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • @chatty24

    Participant

    I think the word ‘Title bar’ might be confusing. By, title bar I mean, ‘Title of the page’ the one that gets displayed on the title bar of the web browser.

    Thanks

    @pinkishhue

    Participant

    I’ve been thinking of this a lot myself, in the way that Facebook or Gmail for example update their title tags. This is a great way of encouraging engagement in the site as people see the number even if their browser is minimised and they’re off working on something else.

    I haven’t tried to implement this myself yet but will have a try asap.

    I guess it’s a case of:

    adding a conditional in to the <title > tag in the themes header.php that says IF there are notifications then display the count. Then, have the page refresh periodically to update the count (or does buddypress do this already to update notifications? I’d have to check)

    So just need to find the code that generates the notifications count.

    Hopefully it’s that simple, but we’ll see 🙂

    @danbp

    Participant
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to change title bar on new notifications’ is closed to new replies.
Skip to toolbar