This is an interesting snippet that will help you to set a preference for the users, so that they will choose their favorite categories and they will see posts from these categories only.
You can add those codes in your functions.php in the theme, if you think your theme wonâ€™t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name â€˜mu-pluginsâ€™. If there is no folder in that name, then create a folder, name it â€˜mu-pluginsâ€™, create a file inside that, give any name you like and paste the code in there. You donâ€™t need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.