• Resolved osterman

    (@osterman)


    First, thank you for a great plugin.

    I’m looking for a method of having a menu link called “favorites” and when a user favorites an item this will change the menu into “favorites (1)” and “favorites (2)” etc depending on how many items the user have as favorites.

    Is there a way to count the number of favorites a user has and post these? Or perhaps this could be a feature in a future release?

    https://www.ads-software.com/plugins/favorites/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Kyle Phillips

    (@kylephillips)

    There aren’t currently any functions that exist that get favorite counts on a user basis, but that’s a good idea and should be relatively straight-forward to implement.

    I’ll add it to the list of features to build out for a future version.

    Awesome! +1 on this feature ??

    Plugin Author Kyle Phillips

    (@kylephillips)

    Version 1.1.1, just released, includes this feature.

    It’s available in a template function:
    get_user_favorites_count($user_id = null, $site_id = null, $filters = null);

    and as a shortcode:
    [user_favorite_count user_id="" site_id="" post_types=""]

    The “filters” parameter in the function is new, and relates to additional new features. The site documentation has been updated (a bit lengthy to explain here):
    favoriteposts.com

    Thread Starter osterman

    (@osterman)

    Thank you very much Kyle!
    I didn’t expect to get this feature so fast.
    5 stars for you, of course ??

    Hi Kyle, we’ve used this new shortcode in our Top menu nav, and it looks (and works) great.

    Question, upon adding a new favorite, is there a way to update the favorites count via ajax (without having to reload the page)? It would be pretty cool if the count automatically updated when adding/removing favorites.

    Any idea how to get that working?

    Thanks bud.
    M!ke

    +1 for ajax updating the count ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Personal favorites count – new feature?’ is closed to new replies.