I am working on a wordpress website where users can register and post things that they would like to promote or anything that they like to post. Now how can i enable notifications for the user whenever someone comments on their posts or like their posts or anything?
closed as too broad by Pat J, Krzysiek Dróżdż♦, Jacob Peattie, Christine Cooper♦, Jack Johansson♦ May 5 '18 at 2:50
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Try BuddyPress. It covers majority of your functionality.
Or you can go with custom approach using Custom PHP script and AJAX with custom tables created in Database. Here is a link to such tutorial.
EDIT : I don't know what approach you are following. But considering you are using Wordpress Post and Comments.
Create a DB table for storing notifications. Click here for a DB schema
Try using 'comment_post' action. And in that function you can get
POST_ID based on
COMMENT_ID & then you can get
POST_AUTHOR based on
POST_ID. Create entry in the notification table mentioned above. You can also send him/her an email as well.
Now when a User logs in. you can fetch entries from Notification table and show it on your web page.
This is just the approach i gave you. For proper execution you can follow the blog post mentioned above and combine it with this approach.