Skip Navigation

[Resolved] posts group pages not readable by guest show up in site search and site map

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 2.69 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Noman 6 years, 9 months ago.

Assisted by: Noman.

Author
Posts
#618839

I am trying to: post group pages should not show up in a site search for guest

Link to a page where the issue can be seen: hidden link

I expected to see: nothing

Instead, I got: pages that are part of a post group and are not visible to guest are included in the search results and site map. when the link is clicked it goes to a 404 page, but they shouldn't show up in the site search at all. thanks.

#618992

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Malaga,

Thank you for contacting Toolset support.

You can easily hide/restrict the pages for guest users:
https://toolset.com/learn/create-membership-site-wordpress-using-toolset-plugins/restricting-read-access-specific-pages-posts-members/

But we can not restrict them from search results. Here is similar ticket that can answer your question:
https://toolset.com/forums/topic/toolset-access-limited-content-in-search-results/#post-574633

Thanks

#619248

Thanks. Well that's like a security company telling me my house is secured like fort knox, but sorry, you'll have to keep your curtains open so the public can see what you got. security yes, privacy no. Or am I missing something? How do I remove posts that are only readable by a post group, from appearing in a site search? even a password protected wordpress page doesn't come up in a search. do I need to password protect all the pages in the group? and sitemaps are in important subject too, whether 3rd party or not, they shouldn't show restricted content, and I consider the post title and link part of the content of the post.

#619674

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Malaga,

I am afraid that this is not possible using built-in Toolset Access features. But if you want to give it a try with custom solution then please note this requires a custom code or modifications which falls into Custom coding & custom development and it is out of support policy (https://toolset.com/toolset-support-policy/). So we recommend to contact Toolset recommended service providers to further discuss the custom approach. We have some recommended list of service providers here if you would like to take a look: https://toolset.com/consultant/

However you can use the below code to exclude the pages and posts from search results:

function jp_search_filter( $query ) {
if ( $query->is_search && $query->is_main_query() ) {
$query->set( 'post__not_in', array( 10,11,20,105 ) );
}
}
add_filter( 'pre_get_posts', 'jp_search_filter' );

>> Also, Access isn't designed to modify the sitemaps generated by SEO plugins, but often you can use those tools on a post-by-post basis to restrict certain posts from showing up in search engine indexes.

Thank you