Search Restrictions
This feature allows site administrators to add search restrictions for different user types. By default, WordPress site search is enabled for all users regardless of their type. You can use this feature to block certain site content from appearing in search results based on user types.
Limitations in Free Version
- Custom Post Types blocking in search results is not available.
- User role based search restrictions are not available for custom post types.
Blocking Specific Content from Search
You can either block certain posts/pages from searching or entire posts/pages from searching. First, we can use Private Content Settings -> Search Settings to block specific Id’s. Following screenshot previews Search Settings section.
You can type the first few letter of post/page title to load the list of post/pages. Then you can select the posts/pages to be blocked from searching. These posts/pages added in this section will be globally blocked from all types of users regardless of their user type.
Search Restrictions by User Type
You can use Private Content Settings -> Search Restrictions section to block different type of content for different type of users in site search. Following screen previews the Search Restriction settings.
Let’s take a look at each setting.
- Everyone can Search – You can add support for searching posts/pages for everyone. You can choose multiple options. Post types added in this section will be searchable for all users regardless of their type. So you can search all the posts from the selected types except the post/pages blocked in Search Settings section. This setting should be used to add post types common for both Guests and Members.
- Guests can Search – You can add support for searching posts/pages for users who are not logged into the site. You can choose multiple options. Post types added in this section will be searchable only for guest users without an account. So you can search all the posts from the selected types except the post/pages blocked in Search Settings section. Guests can also search the types added for Everyone can Search setting.
- Members can Search – You can add support for searching posts/pages for logged in users. You can choose multiple options. Post types added in this section will be searchable for members who have a account on the site and already logged into the site. So you can search all the posts from the selected types except the post/pages blocked in Search Settings section. Members can also search the types added for Everyone can Search setting.