Wrong Street Formatting in Swiss
This topic contains 5 replies, has 3 voices, and was last updated by Paolo 10 years, 3 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
February 13, 2016 at 10:51 am #121708
Hi there
on listing and description the format is wrong for Swiss Format, actually the idea is that EVERYBODY can list his adress and event, thats why should be easy as posible.
is:
Street: 27,Schwizerstrasse
Uster
Zurich
8610
SwitzerlandShould be:
Schwizerstrasse 27
8610 UsterStreet (as given in Front End, “street and number”)
ZIP citywe dont use “region=Canton” in Adress, we dont need the field Country in listing or detail (Because is a website for Adress and Events only in Switzerland, in back end is ok)
Maybe i need to code that part, where should i code that? some tips?
is posible to delete the House icon? (but is not to bad if we should leave it)
how can we delete the word “Street:” on places listing? and detail as well.Thank you very much
Maria Alejandra Paccioreti
February 13, 2016 at 11:39 am #121709These links should give you the info you need to change the address output:
https://wpgeodirectory.com/support/topic/dutch-adres-syntax/
https://wpgeodirectory.com/docs/how-to-use-gd-without-street-addresses/If you only have listings in one country, go to GD > Multilocations > and set country option to default country only.
Add this CSS to hide the House icon
.geodir-i-location i.fa {display: none;}February 13, 2016 at 11:51 am #121710i found the function geodir_show_listing_info($fields_location = ”)}
in ..geodirectory/geodirectory-functions/custom_fields_functions.phpi edit the code from line 2359:
$html = ‘<div class=”geodir_more_info ‘ . $geodir_odd_even . ‘ ‘ . $type[‘css_class’] . ‘ ‘ . $type[‘htmlvar_name’] . ‘” style=”clear:both;” 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 ($preview) {
$html .= stripslashes($post->$html_var) . $addition_fields . ‘</p></div>’;
} else {
if ($post->post_address) {
$myStringLS = $post->post_address;
$myArrayLS = explode(‘,’, $myStringLS);
$html .= ‘<span itemprop=”streetAddress”>’ . $myArrayLS[1] . ‘ ‘ . $myArrayLS[0] . ‘</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>’;
}
$html .= ‘</div>’;
}but, is there some child-theme or a place where i can customize the function without touching the core files? and how can i do that?
Thank you very much
Maria Alejandra Paccioretti
February 13, 2016 at 12:05 pm #121712February 13, 2016 at 12:44 pm #121744It Works!
i am new with wordpres and dont know exactly how HOOKS works…
Thank you very much!
Maria Alejandra
February 13, 2016 at 5:54 pm #121796You should never edit core files directly, that’s lesson number 1! 🙂
Hooks help you avoid doing that. If you edit a core file, after evewry update of the plugin, you’d lose your changes.Thanks
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket