Skip Navigation

[Resolved] Search content in WordPress Archive

This support ticket is created 6 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 6 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#1094549
marketplace.PNG

Hi there...

I've made a marketplace using WordPress Archive in Toolset.... It's display all list of product...

Marketplace.png is my marketplace that I'm make using Toolset...

I'm putting the search to easier the customer search the product... I'm set search filter to search title and content... but it's only can search title, not content on marketplace....

It's any method to solve this?

#1094661

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2018-08-29 at 09.14.37.png

When you say it is set to search the title and content (as in my screenshot), the content you mean is the post body, yes?

I checked on my local test site and it worked correctly.

If by content you also mean custom fields, you would need to use the Relevanssi plugin for that, as described here: https://toolset.com/documentation/user-guides/searching-texts-custom-fields-views-relevanssi/

If the content you are searching for is in the post body and you have the same settings as in the screenshot, then it looks like something is wrong.

In that case the first thing I would need is for you to try the search with the twentyseventeen theme and all non-Toolset plugins disabled, to see if a conflict with other code is preventing it from working correctly.

#1098500

Ok...Thanks, It can search content now.... but it is possible to search dynamic content, it mean content from custom shortcode that I made in function.php?

Example the shortcode is 'coname' and it display company name of author... I'm use shortcode api to made that shortcode...

#1098506

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

No.

If you add a shortcode to the post content, then what is saved in the database (in the post_content column of wp_posts) would include the shortcode, e.g. "the author works for [coname]".

It is only when this content is being rendered on the page that the shortcode is parsed and replaced with the dynamically generated content.

When you perform a search, you are searching the content of the database, so you are searching against "[coname]" and not "Acme Products, Ltd".

If you need to be able to search the company name, you need to rethink what you are doing so that the company name is a field belonging to the posts you are searching.