GEO my WP Support

Use this forum for technical support and general questions related to GEO my WP plugin and its core add-ons only. For technical support and general questions related to any of the premium extensions please open a new premium support ticket.

[Resolved]Make GEO my WP search a certain type of post then display local results

Home Forums Support Make GEO my WP search a certain type of post then display local results

This topic contains 9 replies, has 2 voices, and was last updated by  Eyal Fitoussi 1 month, 1 week ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #58645

    SJD_Digital
    Participant

    I have a type of post created by a listings plugin.

    I would like GEO my WP to search these posts and display the posts that are local to the search input.

    For example, I enter the postcode SE12 into GEO my WP, it then returns all posts that are within X miles.

    Have tried to follow this tutorial in the docs but not exactly sure how to get it working.
    https://docs.geomywp.com/article/154-posts-locator-function-gmwupdatepostlocation

    Do you have a step by step guide showing examples of where to put the code, and how to configure etc.

    Thanks in advance,
    Stuart.

    #58731

    Eyal Fitoussi
    Keymaster

    Hi,

    You need to enable the location form in the listing post types page and use this location form to geotag listings.

    See this page on how to enable the location form in the listing post type and this page on how to geotag a post/post type.

    Then you need to create a Posts Locator search form using GEO my WP forms builder.

    Let me know if this helps.

    #58741

    SJD_Digital
    Participant

    Thanks for the reply Eyal.

    I’ve gone through these steps but I’m still getting ‘No results’ even though I’ve created profiles (‘posts’) via the front end with addresses and locations.

    When I leave the GEO my wordpress form input blank, and search I do get a list of all posts.

    I’m trying to use your plugin with a listings plugin called ‘Advanced Classifieds and Directory PRO’

    Do you have anymore ideas how I could get your plugin to search through the listings posts?

    #58744

    SJD_Digital
    Participant

    Also just to clarify the posts I wish to be searched are created via the front end from customers creating a listing profile.

    Thanks.

    #58745

    SJD_Digital
    Participant

    My listings posts are being saved to the gmw_locations as acadp_listings instead of post. But the geo search is only showing posts in the results.

    #58746

    Eyal Fitoussi
    Keymaster

    In the form editor under the “Page Load results” and “Search Form” tabs, did you select the listing post type in the “Post Types” settings?

    #58756

    SJD_Digital
    Participant

    Hi, yes I’ve added the listing type to the form.

    OK so I can create listings from the backend and they appear in the GEO search.

    Is there a way of adding the GEO form to a front end form so my users can create listings with geo-located listings?

    #58768

    SJD_Digital
    Participant

    Hey,

    So is there a readily available function that I could add after a post is added via the front end that geolocates the post with the form data postcode and that adds it to the fgw_gmw_locations table?

    Something like this: (I’m not a php man!)

    After post save or update do

    function( post ) {
    geolocate post
    add post to the fgw_gmw_locations table
    }

    What do you think?

    #58791

    Eyal Fitoussi
    Keymaster

    Hi,

    Yes, that would be the function ‘gmw_update_post_location()’ from the docs page you mentioned above.

    You need to follow the example on that page and modify it based on your scenario.

    #59038

    Eyal Fitoussi
    Keymaster

    This topic marked “Resolved” due to inactivity. If you need additional help with the above, please open a new support ticket.

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

The topic ‘Make GEO my WP search a certain type of post then display local results’ is closed to new replies.