Brad Ruoho

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Sidebar Address #383300

    Brad Ruoho
    Expired Member
    Post count: 4
    This reply has been marked as private.
    in reply to: Sidebar Address #383254

    Brad Ruoho
    Expired Member
    Post count: 4
    This reply has been marked as private.
    in reply to: Sidebar Address #383201

    Brad Ruoho
    Expired Member
    Post count: 4
    This reply has been marked as private.
    in reply to: Sidebar Address #383198

    Brad Ruoho
    Expired Member
    Post count: 4

    Hi,

    I have reviewed https://wpgeodirectory.com/docs/changing-the-layout-of-addresses/ and installed the code snippets plugin but there is no change.

    Here is my code snippet. Based on the instructions.

    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 = ‘

    ‘;
    $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>
    ‘;}
    if($post->post_city){ $html .= ‘<span itemprop=”addressLocality”>’.$post->post_city.'</span> ‘;}
    if($post->post_zip){ $html .= ‘<span itemprop=”postalCode”>’.$post->post_zip.'</span>
    ‘;}
    if($post->post_country){ $html .= ‘<span itemprop=”addressCountry”>’.$post->post_country.'</span>
    ‘;}
    if($post->post_region){}
    $html .= ‘

    ‘;
    }
    return $html ;

    This has no change to the website.

Viewing 4 posts - 1 through 4 (of 4 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount