How could I let each user subscribe to a specific categories of his choice? I want to do something like reddit subscribe to categories? Is there any tutorial helps doing this?
Leave a Reply
You must be logged in to post a comment.
How could I let each user subscribe to a specific categories of his choice? I want to do something like reddit subscribe to categories? Is there any tutorial helps doing this?
You must be logged in to post a comment.
You can give them this url http://www.example.com/?cat=42&feed=rss2
This one if permalinks are enabled http://example.com/category/categoryname/feed
Replace the site url & also the cateogries id or slug with the correct one
UPDATE IN RESPONSE TO COMMENT
Display a list of categories to the user maybe with
wp_dropdown_categories
. Save the id of the category the user subscribed to in the database by using the functionadd_user_meta()
orupdate_user_meta
, then on the template on which you want to show the posts useWP_Query
to retrieve all the posts.If you don’t know the functions, check out their reference on codex, it’s easy to find on google
There is a plugin “post notification” that allows users to subscribe to posts in general or to specific categories (if you enable this option in the plugin settings). The user will be notified by email if a new post has been published. You can even create email templates.
The plugin hasn’t been updated for a while but still does an excellent job.