Minimize Adress Data

This topic contains 15 replies, has 4 voices, and was last updated by  Stiofan O’Connor 8 years, 5 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #183984

    Dominic Lachmuth
    Expired Member
    Post count: 44

    hi there

    as you can see on the attached screenshot, GDF is showing the address like this:

    Street & Number
    Area Code & City
    State & Country

    However, I would like to have it like this:

    Street & Number
    Area Code & City

    While showing the area code and the city on the next line, atm it is broken (Street, Number, Area Code on one line, on the other: City)

    Is this fixable?

    Dominic

    #184034

    Guust
    Moderator
    Post count: 29970

    You can change that with CSS, have a look at the first section on this page:
    https://wpgeodirectory.com/docs/how-to-use-gd-without-street-addresses/
    https://wpgeodirectory.com/docs/customizing-your-style/

    If you need more help, post your URL of a page where things need changing.

    #184041

    Dominic Lachmuth
    Expired Member
    Post count: 44
    This reply has been marked as private.
    #184126

    Mario
    Expired Member
    Post count: 58

    I am interested at the solution, too. Thx.

    #184132

    Guust
    Moderator
    Post count: 29970

    The CSS looks fine for me.

    span[itemprop="addressCountry"], span[itemprop="addressRegion"] {display:none;}

    To re-organise the address components, add the following to your functions.php file.

    
    
    add_filter('geodir_show_post_address', 'geodir_change_address_order' , 100 , 2) ;
    function geodir_change_address_order($html , $vars)
    {
    	global $post, $preview, $wpdb;
    	$field_icon='';
    	if (strpos($field_icon,'http') !== false) {$field_icon_af = '';}
    		elseif($field_icon==''){$field_icon_af = '<i class="fa fa-home"></i> Adresse';}
    		else{$field_icon_af = $field_icon; $field_icon='';}
    	
    	if(!$preview)
    	{
    		$html = '<p class="" style="clear:both;" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">';
    		$html .= '<span class="geodir-i-location" style="'.$field_icon.'">'.$field_icon_af;
    		$html .=  '&nbsp;';
    		$html .= '</span>';
    		//print_r($_POST);
    		
    		if($post->post_address){ $html .= '<span itemprop="streetAddress">'.$post->post_address.'</span><br>';}
    		if($post->post_zip){ $html .= '<span itemprop="postalCode">'.$post->post_zip.'</span>&nbsp;';}
    		if($post->post_city){ $html .= '<span itemprop="addressLocality">'.$post->post_city.'</span><br>';}
    		if($post->post_country){ $html .= '<span itemprop="addressCountry">'.$post->post_country.'</span><br>';}
    		$html .= '</p>';
    	}
    	return $html ;
    }
    #187010

    Dominic Lachmuth
    Expired Member
    Post count: 44

    Guust, it works partially but now my ZIP Code is located under and after the City:

    “Streetname Streetnumber
    City

    ZIP Code”

    How am I able to Change it to:

    “Streetname Streetnumber
    ZIP Code City”

    #187011

    Guust
    Moderator
    Post count: 29970

    Can I have your FTP, I made a small mistake in your functions.php. Sorry !!

    #187025

    Dominic Lachmuth
    Expired Member
    Post count: 44
    This reply has been marked as private.
    #187092

    Guust
    Moderator
    Post count: 29970

    Can you check those details please. Thanks

    #187094

    Dominic Lachmuth
    Expired Member
    Post count: 44
    This reply has been marked as private.
    #187096

    Guust
    Moderator
    Post count: 29970

    I did already try that, it seems to be the password is wrong.

    #187097

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I have take over this topic and i also can’t connect via ftp, it says incorrect login.
    Please check the details and let us know.

    Stiofan

    #187258

    Dominic Lachmuth
    Expired Member
    Post count: 44
    This reply has been marked as private.
    #187261

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Please check now.

    Thanks,

    Stiofan

    #187262

    Dominic Lachmuth
    Expired Member
    Post count: 44

    thank you its working like a charm!

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