Address layout & Supreme update
This topic contains 8 replies, has 3 voices, and was last updated by vegeta720 8 years, 3 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: address listing layout, Supreme Update
-
AuthorPosts
-
December 18, 2016 at 6:31 am #326414
Hello,
I have two questions. The first is how do I setup the address on listings differently? Currently it is set to the default
75-5819 Alii Dr
Kailua-Kona
Hawaii
96740United StatesIn the United States, we use the address layout of
75-5819 Alii Dr
Kailua-Kona, Hawaii 96740Also, there is no need to have it say “United States” at the end. How can I accomplish this?
My second question is that if I update the theme to the newest versions what changes will I lose on my website. I want to use the newest version but I don’t want to redo everything.
Thanks.
December 18, 2016 at 6:43 am #326426This should assist with changing the address layout: https://wpgeodirectory.com/docs/changing-the-layout-of-addresses/
Unless you have made any changes to the theme itself, which is to be avoided, you should not loose anything on your website.
Thanks.
December 18, 2016 at 7:24 am #326428Guust,
Thanks for getting back to me so quickly. Unfortunately, I am not a skilled coder and I’m not sure what to add or adjust to make sure that it ends up like my example. I found another forum thread and I tried to copy and paste that into GD Design Scripts but it didn’t place “,” between the City and State. Also, I’m not sure how to remove the Country from the address.
As far as making changes, I’m not sure even how to do that. I’ve customized as much as I could without messing with the coding. I was mostly referring to layouts, information that I entered, etc.
I also have another question for you. Is there any way to add a sidebar to blog posts?
Thanks.
December 18, 2016 at 7:37 am #326429Install this plugin: https://wpgeodirectory.com/docs/useful-plugins/#snippets
Then create a snippet with this content:
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>';} 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 .= ' Address: '; $html .= '</span>'; //print_r($_POST); if($post->post_address){ $html .= '<span itemprop="streetAddress">'.$post->post_address.'</span><br> ';} if($post->post_city){ $html .= '<span itemprop="addressLocality">'.$post->post_city.'</span>, ';} if($post->post_region){ $html .= '<span itemprop="addressRegion">'.$post->post_region.'</span> ';} if($post->post_zip){ $html .= '<span itemprop="postalCode">'.$post->post_zip.'</span><br> ';} if($post->post_country){} $html .= '</p>'; } return $html ; }
Whether the post page can have a sidebar depends on the theme you are using.
December 18, 2016 at 7:38 pm #326675Guust, thanks for the help. I am using the Supreme Theme.
December 18, 2016 at 9:54 pm #326709The Supreme theme has a blog post sidebar by default: “Sidebar Blog”.
December 19, 2016 at 5:04 am #326901Thanks Guust. I found it under Customize>Body>Sidebar>Enable Blog Sidebar.
December 19, 2016 at 9:32 pm #327305I use the same address format and I hide the Country as well.
I place the following css by clicking on GEODIRECTORY, DESIGN, SCRIPTS then I paste and save the following CSS:
.geodir-company_info br:nth-child(4),
.geodir-company_info br:nth-child(5),
.geodir-company_info br:nth-child(7) {
display:none;
}#geodir_post_country_row {display: none !important;}
span[itemprop=”streetAddress”] {
display: block;
}span[itemprop=”addressLocality”]:after {content: “, “;}
span[itemprop=”addressRegion”]:after {content: ” “;}div.post_address br {
display: none;
}.geodir-company_info .geodir-i-location{
display:block;
}.geodir_category_list_view li.gridview_onethird:nth-child(3n+3), .geodir_category_list_view li.gridview_onefourth:nth-child(4n+4), .geodir_category_list_view li.gridview_onefifth:nth-child(5n+5) {
margin-bottom: 60px !important;
}December 24, 2016 at 8:27 am #329984Thanks for the help Jimmy.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket