Custom field not displayed in search results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Custom field not displayed in search results

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #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.

    Ernest Marcinko
    Ernest Marcinko


    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.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.