I would like to give my users the ability to customize the homepage of the site. For example, if somebody is not logged in only the default categories appear.
Once someone creates an account and logs in, he/she has opportunity to ‘add/follow‘ more categories and topics (tags) and search results. These new posts will then be added to the stream on the homepage that they see.
I’ve looked and searched a lot for tutorials and plugins, but I haven’t found a lot. There is one premium theme though that kind of has this function.
Category watching Pressboard lets you set individual homepage for each
user: simply enable category watching so users can choose for
themselves which topics to load.
( http://freetotry.me/pressboard/ -> settings button top right )
I want to replicate something similar like the above. But thinking about it, I’m not sure what would be the best approach.
- adding variables to the url (http://codex.wordpress.org/Function_Reference/add_query_arg) and save the result somewhere. And perhaps use jQuery to ‘normalise’ to url location afterwards.
- Enable rssfeeds for each tag, search results and category, where users can subscribe to. Store these feed values and build their homepage from those feeds.
- Add the categories/tags etc to their user profile to follow/unfollow, save that data and adjust the query post.
- Some other way?
Does anyone know how to achieve a custom homepage for each user?
Found and combined some code that seems to work for categories. So leaving the code if somebody else runs into the same problem. For reference.
– Filter all queries with a specific taxonomy
– Adding Custom User Profile data based upon Categories
The below allows a user to choose categories on this profile, after which the frontpage will allow show his selected categories.