• Resolved fawazwordpress

    (@fawazwordpress)


    hi,

    i have different category of posts
    and i have a menu for all categories

    can i have a css class to add in each ( category ) menu item to show notification count/dot only if new post in that category

    for example “events menu item ” will show notification “if new events posted”
    or
    “directory menu item” will show notification if “new post in directory category”

    all this are normal wordpress post types.. not any custom types

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author wpdever

    (@wpdever)

    Hi,

    The css class for the dot/menu is ‘wnbell-count-menu’ (I’m unsure I understand how you’d use it though).

    You can maybe use the ‘wnbell_count_notifications’ filter hook (for logged in users) or the ‘wnbell_conditions_visitor_count’ filter hook (for guests) to change the sql query in your functions.php file to add conditions based on the category.

    Thread Starter fawazwordpress

    (@fawazwordpress)

    thanks for the response,
    but need your help in this

    suppose i have the following menu items in my menu :
    1. latest
    2. events ( slug-events, category id-263 )
    3. classifieds ( slug0-classifeds, category id-235)

    now i have added the [wnbell-menu-item] in css on menu item named “latest”

    so any new posts belonging to any category shows up on ” latest” menu item

    what i need is , if there is a new post in to the “event” category, i want a notification icon to display in the “event” menu item

    and if there is a new post in to the classifieds category, i want the notification icon in the “classified” menu item

    is there a modied css that i can place in the respective menu item or an overall script that can do this to be place in funcitons.php

    can you please give an example of code for atleast one category so i can apply to the rest

    i am using the premium version of the plug in

    your help will be of very much value.

    Plugin Author wpdever

    (@wpdever)

    Hi,

    I had misunderstood what you meant before. Unfortunately, there’s no way I can think of to make this happen. All dots if they’re on the same page will always show the same number of notifications as it’s only just one sql query. The filter ‘wnbell_count_notifications’ I mentioned before would only work if there are bells on different pages (I thought earlier each menu item is in a menu in a different page).
    Also, the bell on the page receives only the count number from the server (1 or 0), with no additonal information of what type of posts it’s about, so css classes would not help much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘css in menu item to show category specific notification’ is closed to new replies.