Navigation überspringen

[Gelöst] i need the search results only to be the related parent page or post

This support ticket is created vor 1 Monat. 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Dieses Thema enthält 4 Antworten, hat 1 Stimme.

Zuletzt aktualisiert von christophS-4 vor 1 Monat.

Assistiert von: Minesh.

Author
Artikel
#2785684
Bildschirmfoto 2024-11-25 um 22.10.23.png

hi.
i use relevanssi for search. the search results should only be "related / parent" posts or pages of the found items.

if i search for "gravostar rm-12l" on versteckter Link
i will get as first result the required one. fine. but as second result i get a long list of unwanted data! aside from that, if i follow the urls of these results i see no connection to the searched term!

how do i get rid of this unwanted data?

#2785720

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

When you use Relevanssi integration - the control of the query passes to the Relevanssi.

To display only related parent posts, you will have to find the parent post and maybe you will require to index those posts as well.

Where you will have to use hooks like:
- versteckter Link
- versteckter Link

You can use post-relationship API function toolset_get_related_post() to get the related post parent:
- https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_get_related_post

You should check with Relevanssi support and get idea about how to use those hooks to get related parent and index related parent post.

#2785727

Thank you. Why does an item called "Search Results / Suchergebnisse" appear in the search results? When I click on this link, I am taken to a page listing all the found items. How can I remove the "Search Results / Suchergebnisse" item from the search results?

#2785802

Minesh
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Kolkata (GMT+05:30)

I do not see the item you mentioned with the search result, It looks like you found the solution on your own.

#2785933

Apologies. Please try again. Search term: Gravostar RM-12L
The search results now yield two items. The first one is desired, while the second is a list of all remaining search results, which is undesired. Is there a way to exclude the second item? This second item with the list of all results appears with every search term.
Thank you.