Simone
Forum Replies Created
-
AuthorPosts
-
November 5, 2014 at 1:04 pm in reply to: How would I add text from the "Near" field to appear in results after "distance" #20639
Hi Adrian, it is a little bit tricky, but you can edit this and make it work:
open listing-listview.php in /wp-content/plugins/geodirectory/geodirectory_templates
find this block
<?php if (round((int)$distance,2) == 0){ $uom = get_option('geodir_search_dist_2'); $distance = geodir_calculateDistanceFromLatLong ($startPoint,$endPoint,$uom); echo round($distance).' '.$uom.'<br />'; }else{ echo round($distance,2).' '.$uom.'<br />'; } ?>
it’s between row 77 and 86
replace this block with
<?php if (round((int)$distance,2) == 0){ $uom = get_option('geodir_search_dist_2'); $distance = geodir_calculateDistanceFromLatLong ($startPoint,$endPoint,$uom); echo round($distance).' '.$uom.' from '.$_REQUEST['snear'].' <br />'; }else{ echo round($distance,2).' '.$uom.' from <br />'; } ?>
You will have the result, as per seen on the screenshot (tested on my demo site)
Sidenote: the modification needs to be redone if a GD update will be released.
Alerted Stiofan, will get back at you shortly.
Hello, I think the reason you don’t see any results when searching for Soho is because Google will understand Soho in New York,and not in London, if you search for “Soho, London” or “Soho, UK” it will display your listing.
That column IS in the database.
Check the attached screenshot.for the other categories you just use the csv as normal, so you will write as usual “1st category, 2nd category, etc”.. in the post_category and then you will add default_category with the id for the default category.
Practical example:1st category id=1
2nd category id=2
3rd category id=3under post_category you will add 1st category, 2nd category, 3rd category
under default_category you will add 1I’m glad 🙂
Auto-zoom is ok because when you select your country/city it will detect the listings and let you see the listings for that specified area, not globally. Try it and see if it works as you would like
Autozoom will auto zoom (:D) so it overrides the manual zoom. It will let you see all the listings. If, for example, the two more distant listings are one in New York and one is in San Francisco, the map will automatically shows from San francisco to New York
Have you set Autozoom in the widget?
Hello, good question….
I took look in the database, this is what you could do (test it with some entries):Check the ID of the category you want to be set as default (you can check going in your post type categories and see the number in the CAT. ID column, for example the category Attractions is ID 2).
Next step is to add a column in your CSV named “default_category” and in here you will insert 2 as it is the category ID for Attractions.
Hope it’s clearThe autozoom is the reason why you don’t see the listings in the map, as Guust said,
the search page is not there because that section is dynamically loaded based on the actionYou have placed the map in the Main content, which is supposed to leave space for a column (right sidebar). Ive add the Top section area in the homepage (in Geodirectory/design/home) and placed the map and the search in there.
You can do that by adding the Map widget (GD > GMAP LISTING PAGE) in the GD Search Right sidebar (or search top section)
Hi, could you please post your login details in a private reply? I’ll have a look, thanks
That was the “trick” 🙂
-
AuthorPosts