• Resolved eralpsahin

    (@eralpsahin)


    Hello,

    I am pretty new to WordPress API, loving it btw, I have a small project, adding a like button to the end of every post, pressing it makes user like the post, button changes to dislike, pressing again makes user dislike the post.

    Without the knowledge of WordPress API, I planned to create a table in which I will store the post-id and user-ids. Plugin will know by querying the table if the user has already liked the post. But on the internet I found a lot of examples of like buttons, not creating a custom table and using update_post_meta, and if I understood right update_post_meta does not alter any table in the database or insert new rows. Because I tried some of the plugins which uses update_post_meta and after liking a post, my wp_posts and wp_postmeta tables does not change at all.

    My question is where exactly is post_meta stored, where does wordpress store the new custom field ‘like_count’ if I do this;
    update_post_meta($post_id, 'like_count',1);

Viewing 1 replies (of 1 total)
  • Thread Starter eralpsahin

    (@eralpsahin)

    Totally my fault, I was not showing all rows on wp_postmeta. They are stored in postmeta table as I expected.

Viewing 1 replies (of 1 total)
  • The topic ‘Where does the actual data stored by add_post_meta’ is closed to new replies.