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

    (@kylephillips)

    Logged in users’ favorites are stored as user meta with the key of simplefavorites. (Stored as an array)

    Total number of favorites for a specific post is stored as custom post meta, with a key of simplefavorites_count.

    Anonymous users’ favorites are not stored in the DB. They are stored either by session or cookie, depending on the plugin option selected.

    Thread Starter LeonardShelby

    (@leonardshelby)

    Hi,
    Actually I would not label this as resolved yet please.
    I favorited a post. I then looked in wp_postmeta for the specific post ID of the post that I favorited. The post is there, but there is no “simplefavorites” key.

    Plugin Author Kyle Phillips

    (@kylephillips)

    I’m sorry, I probably wasn’t clear.

    The actual post ID for logged-in user favorites are stored as user meta, which is in the usermeta table, under the corresponding user. This is stored as an array, by site_id (for multisite installations). If the user is logged out, nothing is stored in the DB.

    The only information stored in the postmeta table is the total number of favorites a post has. If you’ve disabled anonymous users’ favorites from effecting count, those won’t be reflected here.

    Thread Starter LeonardShelby

    (@leonardshelby)

    Ok. What is the key in the wp_postmeta table that is associated with the total number of favorites a particular post has received?

    Plugin Author Kyle Phillips

    (@kylephillips)

    simplefavorites_count

    If a user is not logged in, and the plugin setting “Include in Post Favorite Count” isn’t checked, it won’t count towards/save that number.

    Hi Kyle,

    and thanks for your awesome plugin.
    I even would like to have a persistent favorites list that’s stored in the databasse.

    What about an additional option:

    Save Favorites in

    Cookie
    Session
    Database

    best regards

    Thread Starter LeonardShelby

    (@leonardshelby)

    Ok got it

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘What database table does Favorites use?’ is closed to new replies.