Default Location – Region

This topic contains 10 replies, has 3 voices, and was last updated by  Paolo 9 years, 9 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #10739

    Dmitri
    Free User
    Post count: 42

    Hello,

    Is there any way to get rid off “Region” from Address. In many small countries like Latvia we don’t have Region or State at all.

    For example Latvian address look like:

    Kaļķu iela 8, Rīga, LV-1050, Latvia

    With “Region” required the address at GD look like

    Kaļķu iela 8
    Rīga
    Rīgas pilsēta
    LV-1050
    Latvia

    http://www.informeron.lv/kur-paest/riga/restorani/ribs-rock/

    For “Rīga” GD set region as “Rīgas pilsēta”

    Also address in one or two lines looks better, for example

    Kaļķu iela 8, Rīga, LV-1050, Latvia

    or

    Kaļķu iela 8, Rīga
    LV-1050, Latvia

    Is it possible to set it up this way.

    Thanks,
    Dmitri

    #10797

    Simone
    Expired Member
    Post count: 3515

    Hello, actually it can’t be done for the core, what can be done is maybe hiding the region from the CSS with some tweaking

    #10808

    Paolo
    Site Admin
    Post count: 31206

    That is the address as Google Maps API returns it for that address.

    As Simone suggested you can tweak things around with css.

    Thx

    #10824

    Dmitri
    Free User
    Post count: 42

    Could you help me to do that, I couldn’t figure out witch class exactly is responsible for address region?

    Thanks,
    Dmitri

    #10870

    Simone
    Expired Member
    Post count: 3515

    At first look, the address doesn’t have a specified span class, so first it must be declared in the template tags and then added to the css.
    (I know…I’m being vague 🙂 )

    #10892

    Dmitri
    Free User
    Post count: 42

    Could you help me to declare it in the template.

    #10941

    Paolo
    Site Admin
    Post count: 31206

    Best you can do without modifying templates.

    // remove line breaks we don’t want and the region field

    
    
    .geodir-company_info .geodir_more_info span:nth-child(6), 
    .geodir-company_info .geodir_more_info br:nth-child(3), 
    .geodir-company_info .geodir_more_info br:nth-child(7), 
    .geodir-company_info .geodir_more_info br:nth-child(9)  
    {
        display: none;
    }
    

    // add space between address and city, zip and country

    
    
    .geodir-company_info .geodir_more_info span:nth-child(2), .geodir-company_info .geodir_more_info span:nth-child(8) {
        margin: 0 10px 0 0;
    }

    Thx

    #10985

    Dmitri
    Free User
    Post count: 42

    Thanks Paolo, that works! I just need to figure out how to add “,”.

    Thanks again,
    Dmitri

    #11039

    Paolo
    Site Admin
    Post count: 31206

    YW,

    there is no way to do tht without modifying the template…

    #11133

    Dmitri
    Free User
    Post count: 42

    Do you know how should I modify the template to add “,”?

    #11182

    Paolo
    Site Admin
    Post count: 31206

    You need to dig into the templates code and work with hooks and filters.

    There are few example of how to edit/hide sidebar items in the forum (try to search for :remove_action), you can start looking at them and figure out the rest.

    This is a customization and we can’t take the time to write the code in details for you. Sorry…

    Thx

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