Skip Navigation

[Resolved] Text search box (no filters) for home page only results from specific CPT

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 1 year, 6 months ago.

Assisted by: Waqar.

Author
Posts
#2467411
snapshot home page with search box.jpg

Tell us what you are trying to do?
I am trying to create a 'Google' style 'text search box' on the front page of my Mental Health Issues website - the search should only return results from the data in the specific CPT (custom Post Type) 'Therapies for' which is basically the information page about each 'issue' that we can help with.

There will be 300 to 400 pages eventually (in the CPT 'Therapies for') so it is vital that only this CPT is used to deliver the results.

At the moment the home page (which has a WordPress search box inserted, not a Toolset box) simply returns any results with a word typed into the search box, so for example if a client is looking for the page on 'antenatal depression' I only want relevant pages from the CPT 'Therapies for' to be returned, perhaps just the Post Title and the excerpt'

At the moment any page that has the words 'antenatal' or 'depression' is delivered back, so I get all the post titles of the 'Therapists' and any other page that has either word in it.

Finally I want the results to show on a different 'results' page, not under the search box of the home page.

Is there any documentation that you are following?
I tried following several different documents but none worked

Is there a similar example that we can see?
not that I can think of.

What is the link to your site?
hidden link

#2467523

Waqar
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting us and I'd be happy to assist.

For what you're planning, you can create a Toolset view and set it to show the results, only from the selected post types. We have a detailed guide on the topic at:
https://toolset.com/lesson-placement/lesson-placements-1622935-1621213/

Once the view is working on the search results page, you can show only its search form, on the home page, as explained in this guide:
https://toolset.com/lesson-placement/lesson-placements-1622935-1979405/

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.