Skip Navigation

[Resolved] Relationship posts appearing in search results

This thread is resolved. Here is a description of the problem and solution.

Problem:

Intermediary posts created for Toolset relationships were appearing in public WordPress search results.

Solution:

Go to Toolset → Post Types, edit the relationship’s intermediary post type, expand the Options panel, enable exclude_from_search, and save the post type.

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.

This topic contains 1 reply, has 1 voice.

Last updated by neilR 4 days, 13 hours ago.

Assisted by: Christopher Amirian.

Author
Posts
#2870138

We have a number of Toolset relationships set up, and relationship posts are appearing in our search results.
For example, we have a relationship set up between 'Sponsor Roles' and 'Organisations'. When searching for 'ons' and not logged in, a post appears with the title 'Sponsor Roles - Organisation: 32714 - 34235', which I assume is the post created for the relationship which exists between organisation 32714 and Sponsor Role 34235.
How do I exclude these back-end posts from search results please?

#2870454

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Welcome to Toolset support.

You can exclude them without any code:

- Go to Toolset → Post Types.
- Edit the intermediary post type used by the Sponsor Roles / Organisations relationship (its name will match the relationship, e.g. "Sponsor Roles Organisation").
- Expand the Options panel below the main settings.
- Tick exclude_from_search.
- Save the post type.

Thanks.

#2870931

Thanks. Hadn't twigged I could do that there - they were all on page 2 of post types!