- September 10, 2016 at 10:40 pm #10069
We purchased the ajax search pro plugin, which seems to search custom fields correctly but when there are multiple custom fields on one page, it is only showing the first one in the results instead of the relevant one.
For example, on our site you will see that we have multiple “sections” per page, each has its own title. When we search the site with your plugin, the results are returned correctly BUT the title shown in the search results is always that of the first section on the page. We need it to show the section title for the RELEVANT section.September 12, 2016 at 10:57 am #10086
I’m sorry to say this, but this is programatically impossible with this plugin. I will try to explain why:
When the plugin does the search it passes on so called “queries” aka. “requests” to the database server. These queries are basically commands to retrieve data from the database. The search query is constructed in a way that it gets back the possible results set and some additional information, including relevance. The relevance however is only a single number calculated based on occurences and other factors – but there is no other information like how many times the search phrase occurs per certain custom field. This information can’t be requested, therefore it’s not possible to tell which of the fields is more relevant from the others.
The title displayed is always the post/page title which is requested from the wordpress core.
If there was a simple modification to achieve this somehow, I would gladly do it for you, but unfortunately I’m not aware of any possible way of achieving this, I’m very sorry.Best,
If you like my products, don't forget to rate them on codecanyon :)
You must be logged in to reply to this topic.