Display Only First Line Of Address

This topic contains 4 replies, has 2 voices, and was last updated by  True Design 8 years, 6 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #363569

    True Design
    Free User
    Post count: 35

    Hi,

    Is it possible to only show the first line of the address for this view only? See attached screenshot.

    Thanks.

    #363576

    Kor
    Moderator
    Post count: 16516

    Hi there,

    Could you try using the custom CSS code below and see if it’s what you’re looking for?

    
    
    span[itemprop="addressLocality"],
    span[itemprop="addressRegion"],
    span[itemprop="addressCountry"],
    span[itemprop="postalCode"]  {
       display:none!important;
    }
    
    .geodir_more_info br:nth-child(4),
    .geodir_more_info br:nth-child(3),
    .geodir_more_info br:nth-child(5),
    .geodir_more_info br:nth-child(7),
    .geodir_more_info br:nth-child(9)  {
        display:none!important;
    }
    #363578

    True Design
    Free User
    Post count: 35

    Hi Kor,

    Thanks for that, unfortunately thats not exactly what I was looking for.

    If possible, I would only like to display the first line of the address.

    The css code you gave me, removes the line breaks and puts all the address on one line.

    I literally only want to display Address : Sandymount

    See attached screenshot.

    Thanks.

    #363584

    Kor
    Moderator
    Post count: 16516

    Hi there,

    I’ve just applied the custom CSS code below into GD > Design > Scripts > Custom Style CSS. Could you check and see if it’s what you’re looking for?

    
    
    .geodir_location_listing span[itemprop="addressLocality"],
    .geodir_location_listing span[itemprop="addressRegion"],
    .geodir_location_listing span[itemprop="addressCountry"],
    .geodir_location_listing span[itemprop="postalCode"]  {
       display:none!important;
    }
    
    .geodir_location_listing .geodir_more_info br:nth-child(4),
    .geodir_location_listing .geodir_more_info br:nth-child(3),
    .geodir_location_listing .geodir_more_info br:nth-child(5),
    .geodir_location_listing .geodir_more_info br:nth-child(7),
    .geodir_location_listing .geodir_more_info br:nth-child(9)  {
        display:none!important;
    }

    Thanks!

    #363604

    True Design
    Free User
    Post count: 35

    That worked perfectly, thank you…

Viewing 5 posts - 1 through 5 (of 5 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