Meta Search

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 5 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19790
    vancouver_hawk
    vancouver_hawk
    Participant

    Hi, I am trying to get the plugin to search for meta on the listing pages. Here is the page where search was set up https://listination.ca/property-search/ , right now it only searches for titles of listings and pages. But I also need it to search for MLS Number on within the listing page and Neighbourhood/Community. For example this property https://listination.ca/properties/323-350-e-2nd-avenue-vancouver-british-columbia-v5t-4r8-20026415/ when I type R2315910 it should display that listing. The MLS number is <?php echo $property[‘common’][‘DdfListingID’] ?> and neighbourhood <?php echo $property[‘address’][‘Neighbourhood’] ?> and community <?php echo $property[‘address’][‘CommunityName’] ?>. This info can be found in /public_html/wp-content/themes/divi-child/realtypress/partials/property-single-details.php

    Please let me know how to do this.

    Thank you,

    Tim

    #19804
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Tim,

    Thank you very much for the proper details, it helped me a lot.

    I have looked at the template, and those fields does not look exactly like post meta, rather some sort of custom data. However I found that, there was a very simlple way of getting the property data, so I constructed and inserted an additional code the functions.php file in the child theme directory. That code will make sure to obtain and include this information during the indexing process.
    Please note that this is sort-of a customization, so I cannot guarantee that this will work in all cases at all times.

    For future reference, this is the code I have insterted to the functions.php, please leave it there. It will work with future updates of course.

    I re-indexed the database, now it should give results to the keywords from these fields as well.

    Best,
    Ernest Marcinko

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


    #19817
    vancouver_hawk
    vancouver_hawk
    Participant

    Hi Ernest,

    Thank you so much for that, it works!!!

    I just had another question, is it possible to add titles to the searched meta and separate them from by the category. For example if start typing Vancouver it will show neighbourhood with the name containing Vancouver, city containing Vancouver and street containing Vancouver all separated by the main category. Same goes for the address and MLS number, kind of like here https://www.rew.ca (see photo attached)

    Please let me know.

    Thank you,

    Tim

    Attachments:
    You must be logged in to view attached files.
    #19828
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Tim,

    If the items are separated into categories or some sort of taxonomies, then you could use the grouping by categories feature for that: https://documentation.ajaxsearchpro.com/advanced-options/grouping-results

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.