1 Comment
  1. If it disappears from functions.php on theme update, you are probably using a prebuilt theme and not using a child theme for it.

    You have to create a child theme, even if it’s only for the functions.php. More Info here: https://developer.wordpress.org/themes/advanced-topics/child-themes/

    For your specific question, you can read how to redirect specific pages to e.g. Home, if the user is not logged in here:
    https://wordpress.stackexchange.com/questions/131879/how-to-redirect-non-logged-in-users-to-a-specific-page

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer