Follow these steps to understand how to use multiple conditional tags to display a specific page for only members of the site:
- Log in to the WordPress Dashboard as an administrator.
- Click the Pages menu.
- Click the Add New option.
- Create a new page with content that's private to members and save the page.
- Get the page ID from the browser URL. The last part of the URL will look like post.php?post=2&action=edit.
- Open the wp-content/themes folder of your WordPress installation and open the functions.php file of Twenty Twenty child theme.
- Add the following code at the end of the functions.php file to apply restrictions on the specified page and redirect unauthorized users. We've used 2 as the ID of the page. Feel ...