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
  • Author
    Posts
  • #415927

    Dan Minimal
    Free User
    Post count: 13

    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 States

    How can this be resolved?

    Thank You, Danny

    #415941

    Dan Minimal
    Free User
    Post count: 13

    Ok. 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”.

    #415942

    Dan Minimal
    Free User
    Post count: 13

    Ok. 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

    #415947

    Alex Rollin
    Moderator
    Post count: 27815

    With the Location Manager Addon you get an interface for managing the additional locations:

    https://wpgeodirectory.com/downloads/location-manager/

    #415948

    Dan Minimal
    Free User
    Post count: 13

    Thanks for the tip, but it looks like I just saved $40 by doing it myself.

    #415954

    Dan Minimal
    Free User
    Post count: 13

    ehhh, 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

    #415959

    Alex Rollin
    Moderator
    Post count: 27815

    Hello 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/

    #415963

    Dan Minimal
    Free User
    Post count: 13

    Thanks 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.

    #415964

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #416030

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi 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

    #416228

    Dan Minimal
    Free User
    Post count: 13

    Ho 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

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount