Minimize Adress Data
This topic contains 15 replies, has 4 voices, and was last updated by Stiofan O’Connor 9 years, 6 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
May 2, 2016 at 8:59 pm #183984
hi there
as you can see on the attached screenshot, GDF is showing the address like this:
Street & Number
Area Code & City
State & CountryHowever, I would like to have it like this:
Street & Number
Area Code & CityWhile 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
May 2, 2016 at 9:40 pm #184034You 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.
May 2, 2016 at 9:55 pm #184041This reply has been marked as private.May 3, 2016 at 9:19 am #184126I am interested at the solution, too. Thx.
May 3, 2016 at 10:32 am #184132The 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 .= ' '; $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> ';} 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 ; }May 9, 2016 at 10:07 am #187010Guust, it works partially but now my ZIP Code is located under and after the City:
“Streetname Streetnumber
CityZIP Code”
How am I able to Change it to:
“Streetname Streetnumber
ZIP Code City”May 9, 2016 at 10:14 am #187011Can I have your FTP, I made a small mistake in your functions.php. Sorry !!
May 9, 2016 at 12:02 pm #187025This reply has been marked as private.May 9, 2016 at 12:55 pm #187092Can you check those details please. Thanks
May 9, 2016 at 1:13 pm #187094This reply has been marked as private.May 9, 2016 at 1:17 pm #187096I did already try that, it seems to be the password is wrong.
May 9, 2016 at 1:29 pm #187097I 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
May 9, 2016 at 6:37 pm #187258This reply has been marked as private.May 9, 2016 at 6:41 pm #187261Please check now.
Thanks,
Stiofan
May 9, 2016 at 6:42 pm #187262thank you its working like a charm!
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket