Default Location added to Business Listing
This topic contains 10 replies, has 3 voices, and was last updated by Dan Minimal 7 years, 7 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
February 4, 2018 at 9:02 pm #415927
Hi All,
Ok so I have a default location set for Linesville, Pennsylvania. When I add a business entry for a location in Lilly Dale, New York I have to add the address by Lat and Long or else I get strange behavior. That’s not such an issue, but the place is getting a location ID of “United States-Pennsylvania-Linesville”. Then on the front end the address shows as
Address: Lily Dale, New York
Linesville
Pennsylvania
14718
United StatesHow can this be resolved?
Thank You, Danny
February 5, 2018 at 1:05 am #415941Ok. So on the details page on the frontend in the div with class “geodir_more_info post_address” I have resolved the double state and city showing. It was my fault that it was showing, but I still needed to be able to add a listing for a business other than just those local to the default location. In the file wp-content/plugins/geodirectory/geodirectory-functions/custom_fields_output_functions.php on lines 1752 add //$show_city_in_address = true; and 1764 add // $show_region_in_address = true;. Now the entire address ( 111 Fake St, Sometown, Ohio, 44009 ) must be added in the admin on the address line. This is doing the trick, but I still need to take care of the div with class “sd-address” which shows the default location city and state just below the “sd-entry-title”.
February 5, 2018 at 1:17 am #415942Ok. Got it. in file wp-content/themes/supreme-directory/inc/geodirectory-compatibility.php
Comment out lines 718 through 726 and replace with
if (isset($post->post_address) && $post->post_address) {
$sd_address .= stripslashes($post->post_address);
}Done!
Danny
February 5, 2018 at 2:53 am #415947With the Location Manager Addon you get an interface for managing the additional locations:
February 5, 2018 at 3:29 am #415948Thanks for the tip, but it looks like I just saved $40 by doing it myself.
February 5, 2018 at 3:51 am #415954ehhh, guess I didn’t realize the full scope of what you’re all doing here. Give the main plugin with places for free, but sell many more add-ons. So, my apologies for posting an address solution (for those who can follow along). I’ll be sure to keep my customizations to myself from now on. lol. Sorry about that.
Danny
February 5, 2018 at 4:00 am #415959Hello Dan,
you may find that the core plugin will not work as expected once modified.
Here’s a readme about templates:
https://wpgeodirectory.com/docs/customizing-geodirectory-templates/
February 5, 2018 at 4:17 am #415963Thanks Alex. I’ve been coding since 2007. I’m good. Just need a kick into the right direction from time to time. Just modified the search to not include “near”. Which caused jquery error. Went about it another way by removing the wrapper div and then changing the snear input type from text to hidden so that the js could still fire on it. It’s really coming along nicely. Thanks for the great platform!
Dan.
February 5, 2018 at 4:33 am #415964This reply has been marked as private.February 5, 2018 at 1:18 pm #416030Hi Dan,
The code is GPL so you are free to modify it, however i would just mention the changes will make it incompatible with almost all our addons.
Thanks,
Stiofan
February 6, 2018 at 7:48 am #416228Ho Stiofan,
Thanks for the heads up. I have backups of the affected files as well as a spreadsheet notating the reason for the modification and altered files. If an update happens to overwrite the files I can easily merge my changes into the new files.I did notice that you do offer a wide array of addons. I don’t need any of them at the moment, but if I ever do and find a conflict I will work through it and arise victorious on the other side.
Best, Danny
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket