Skip Navigation

[Resolved] Toolset Search Not Working

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

Problem: I am using a WordPress Archive for the site search archive, including custom post types and custom fields. The results are not complete.

Solution: Check to be sure Relevanssi is configured to index custom fields and custom post types. Also check the minimum word length if you want to index a two-letter abbreviation, like "UX".

Relevant Documentation:

https://toolset.com/documentation/user-guides/searching-texts-custom-fields-views-relevanssi/

This support ticket is created 5 years, 3 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 20 replies, has 2 voices.

Last updated by maxfieldB 5 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1370745

Tell us what you are trying to do?
Use Toolset in Search - however using search on my site continues to show "no results" - I have already followed the toolset instructions and tried disabling my theme. Can you help?

Is there any documentation that you are following?
Toolset documentation

Is there a similar example that we can see?

What is the link to your site?
battstaging2.com

#1371037

Hi, are you talking about the standard WordPress search like yoursite.com/?s=something or are you talking about a custom search View with a text input field?

- If it's the former, please tell me if you have created a WordPress Archive for search results?
- If it's the latter, can you show me screenshots of the custom search View in wp-admin?
- Can you tell me exactly what you're searching for?
- Can you tell me where that term should be found - post title, post content, custom field, etc?

#1371157

Thank you Christin,

Yes, this is the default WP search. You can try by going to battstaging2.com, hitting the search icon, and searching for a term that is common, such as "computer," however it yields no results.

I have two custom post types: Adult Programs and also K-12 Programs. My understanding is that by turning these "on" in Relevanssi, WordPress search should not recognize my custom post types, however it is currently failing to do so.

Thanks!
Max

#1371381

You must also enable these two post types in your WordPress Archive for search. If you have already created this archive, check the Content Selection settings and confirm that the two custom post types are included here. If you have not yet created this WordPress Archive, you should create a WordPress Archive and set it to be used for search results. In the Content Selection area, make sure both the custom post types are included. If you already have these things set up and it's still not working as expected, I'll take a closer look.

#1371611

Could you give me a bit more information on the steps here? I created a *new* archive, set it for "Search Results" but I don't see any section named "Content Selection" that would enable me to include my custom post types. Thanks!

#1371711
Screen Shot 2019-10-28 at 4.12.49 PM.png
Screen Shot 2019-10-28 at 4.12.55 PM.png

There is usually a button under the Search Results Loop Selection. You can click that button to edit the different post types that will be displayed in the Search Results archive. See attached screenshots.

#1372643
Screen Shot 2019-10-29 at 1.02.03 PM.png

Got it,

I have followed these steps - the results are at least including pagination, however the actual results are empty. Can you help me troubleshoot it? I am happy to provide login credentials to our site - this has worked well in the past.

Thank you!
Max

#1373123

Can you copy + paste the contents of this archive's loop editor here for me to review? If a loop template is used, please copy + paste the contents of that template as well. I'll review those items and see if there's anything obviously wrong. If not, I'll ask for login credentials so I can take a closer look.

#1374287

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop wrap="1" pad="true">
[wpv-item index=1]
<div class="row ">
<div class="col-sm-12">[wpv-post-body view_template="loop-item-in-search-results"]</div>
</div>
[wpv-item index=other]
<div class="col-sm-12">[wpv-post-title]s</div>
[wpv-item index=pad]
<div class="col-sm-12"></div>
[wpv-item index=pad-last]
<div class="col-sm-12"></div>
</div>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

#1374291

If you replace the contents of the Loop Editor with the following code, do you see post titles appear?

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop>
[wpv-post-title] <br />
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]
#1374299

That's strange - this actually works.

#1374301

Okay so there could be something wrong in this template:

[wpv-post-body view_template="loop-item-in-search-results"]

Can you copy + paste the contents of that template here for me to review?

#1374303

We only had one thing in there for now:

[wpv-post-title]

#1374305

The template may have become corrupted somehow. Here's how I would try to fix this. Click "Loop Wizard" and recreate the loop using a simple structure like "Unformatted". Be sure you uncheck the Create a content template checkbox in the popup. This will recreate the loop without a Content Template. Then if you want to set up a complex loop structure, create the loop again using the Loop Wizard and you can try with a Content Template. If that still doesn't work, I'll have to take a closer look.

#1376543

My issue is resolved now. Thank you! I Appreciate the help!