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?
2 Answers
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 function add_user_meta()
or update_user_meta
, then on the template on which you want to show the posts use WP_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
-
I don't want to let user subscribe by rss. I want to show him with wordpress loop content from categories he has subscribed to. Commented Oct 22, 2012 at 6:28
-
Edited the answer. I'm not familiar with Reddit, so assumed it was RSS by reading the word subscribe Commented Oct 22, 2012 at 7:45
-
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.