Address layout & Supreme update

This topic contains 8 replies, has 3 voices, and was last updated by  vegeta720 7 years, 6 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #326414

    vegeta720
    Full Member
    Post count: 128

    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 States

    In the United States, we use the address layout of

    75-5819 Alii Dr
    Kailua-Kona, Hawaii 96740

    Also, 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.

    #326426

    Guust
    Moderator
    Post count: 29970

    This 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.

    #326428

    vegeta720
    Full Member
    Post count: 128

    Guust,

    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.

    #326429

    Guust
    Moderator
    Post count: 29970

    Install 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 .=  '&nbsp;Address:&nbsp;';
    		$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.

    #326675

    vegeta720
    Full Member
    Post count: 128

    Guust, thanks for the help. I am using the Supreme Theme.

    #326709

    Guust
    Moderator
    Post count: 29970

    The Supreme theme has a blog post sidebar by default: “Sidebar Blog”.

    #326901

    vegeta720
    Full Member
    Post count: 128

    Thanks Guust. I found it under Customize>Body>Sidebar>Enable Blog Sidebar.

    #327305

    Jimmy Ryan
    Expired Member
    Post count: 202

    I 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;
    }

    #329984

    vegeta720
    Full Member
    Post count: 128

    Thanks for the help Jimmy.

Viewing 9 posts - 1 through 9 (of 9 total)

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

Open Support Ticket