Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Distance to Location no longer works #58463
    jpequens
    Member

    Thanks! I did not have <?php global $post; ?>

    in reply to: Distance to Location no longer works #58398
    jpequens
    Member

    Yes, it is in the results template and not populating anything.

    Search a location on this page if you would like to see it: Floattanks.net

    I have it to the left of the map and hours link on each result.

    in reply to: Dynamic Starting Address for Loaded Results Page #58352
    jpequens
    Member

    Hello –

    I had the above code on this thread working to filter out search results on pages like this:

    Orlando

    This way it would load only locations nearby Orlando FL (I was passing in the city with a custom field).

    It looks like that filter no longer works with the update. Any suggestions on where to make the adjustment? Is this now a premium feature?

    Any direction would be helpful.

    Thanks!

    in reply to: Dynamic Starting Address for Loaded Results Page #44015
    jpequens
    Member

    Finally got it to work.  Here is what it is if anybody needs it.  ‘city_address’ is the custom filed I am using so change that as needed.  I also have this for Form ID 5.  Just add the below to the functions.php file and change your form id or custom field as needed.

    in reply to: Dynamic Starting Address for Loaded Results Page #43859
    jpequens
    Member

    I’ve tried following the information from this page and still not having any luck:

    https://wordpress.org/support/topic/possible-to-set-the-default-starting-address-on-the-fly

    add_filters is something I’ve not done much with before, so I’m not sure If I need to do anything special

    I’ve added this to my functions.php file (I’m using form id=5 and a advance custom field ‘city_address’)

     

    function gmw_formload( $gmw ) {

    $city_cord = the_field(‘city_address’);

    if ( $gmw[‘ID’] == 5) {
    $gmw[‘page_load_results’][‘address_filter’] = $city_cord;
    }

    return $gmw;
    }
    add_filter( ‘gmw_pt_default_form_values’ , ‘gmw_formload’, 99 );

     

    Feel like I am close…any help would be very much appreciated

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