Adding ZIP, City and Country on Listing overview

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

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

Open Support Ticket
  • Author
    Posts
  • #347557

    Jorge Dändliker
    Buyer
    Post count: 150

    Hi
    Is there a possibility to add the ZIP code, City and Country on the Listing overview somewhere below the title? I know that I can add the whole address (place settings > custom fields) but I only want to show the above mentioned fields together on one row (and not the complete address including street and region on different rows (example: 8000 Zurich, Switzerland).
    Any idea?
    Many thanks!
    Jorge

    #347711

    Kor
    Moderator
    Post count: 16516

    Hi Jorge,

    This can be achieved using custom CSS. Do you have a sample listing with a full address on the “Listing Page”? I can provide you the custom CSS snippet to do this.

    Thanks!

    #347727

    Jorge Dändliker
    Buyer
    Post count: 150
    This reply has been marked as private.
    #347732

    Kor
    Moderator
    Post count: 16516

    Hi Jorge,

    Kindly use the custom CSS code below and see if it’s what you’re looking for. Insert into Gd > Design > Scripts > Custom Style CSS

    
    
    span[itemprop="streetAddress"], 
    span[itemprop="addressRegion"]{
        display:none!important;
        
    }
    
    p[itemprop="address"] br:nth-child(2),
    p[itemprop="address"] br:nth-child(4),
    p[itemprop="address"] br:nth-child(8) {
        display:none!important;
    }
    #347827

    Jorge Dändliker
    Buyer
    Post count: 150

    Hi Kor
    Thanks for your help. Unfortunately, I just wanted to show the address like this on the listing overview.
    On the detail page the whole address should be shown. Would this be possible somehow?

    Would it also be possible to set a blank (” “) between “Address” and the Zip code?

    Thanks again!
    Jorge

    #347864

    Kor
    Moderator
    Post count: 16516

    Hi Jorge,

    I’ve just applied the changes for you and below are the custom CSS code for your reference.

    
    
    .post-type-archive span[itemprop="streetAddress"], 
    .post-type-archive span[itemprop="addressRegion"]{
        display:none!important;
        
    }
    
    .post-type-archive p[itemprop="address"] br:nth-child(2),
    .post-type-archive p[itemprop="address"] br:nth-child(4),
    .post-type-archive p[itemprop="address"] br:nth-child(8) {
        display:none!important;
    }
    
    .post-type-archive span[itemprop="postalCode"] {
    margin-left:5px;
    }

    Thanks!

    #348056

    Jorge Dändliker
    Buyer
    Post count: 150
    This reply has been marked as private.
    #348169

    Paolo
    Site Admin
    Post count: 31206

    Your assumption is correct, you need to add this body class for search results:

    .geodir_advance_search

    so this:

    
    
    .post-type-archive span[itemprop="streetAddress"], 
    .post-type-archive span[itemprop="addressRegion"]{
        display:none!important;
        
    }

    will become:

    
    
    
    .geodir_advance_search span[itemprop="streetAddress"], 
    .geodir_advance_search span[itemprop="addressRegion"], 
    .post-type-archive span[itemprop="streetAddress"], 
    .post-type-archive span[itemprop="addressRegion"]{
        display:none!important;
    }

    and you need to correct the rest of the css that Kor provided.

    Thanks

    #348361

    Jorge Dändliker
    Buyer
    Post count: 150

    Hi Paolo and Kor
    What a great support! Many thanks!
    Best regards
    Jorge

    #348525

    Paolo
    Site Admin
    Post count: 31206

    You are welcome 🙂

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

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

Open Support Ticket