(T_ENCAPSED_AND_WHITESPACE)

This topic contains 6 replies, has 3 voices, and was last updated by  Paolo 6 years, 10 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #384429

    kerry
    Lifetime Member
    Post count: 138

    I was following directions for changing address look. I added Edit Snippet and added the below several ways and kept getting error messages. All error messages were between lines 29-35.

    -The snippet has been deactivated due to an error on line 32:
    syntax error, unexpected ”; ‘ (T_ENCAPSED_AND_WHITESPACE)

    I kept trying different options and nothing worked. Also, If I want to remove country I would take out this line, correct?
    if($post->post_country){ $html .= ‘<span itemprop=”addressCountry”>’.$post->post_country.'</span>
    ___________________________________

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

    #384431

    Kor
    Moderator
    Post count: 16516

    Hi Kerry,

    Please share WP temp admin access to your site so we can take a better look. You can post the details here using the private reply option below.

    #384435

    kerry
    Lifetime Member
    Post count: 138
    This reply has been marked as private.
    #384445

    Kor
    Moderator
    Post count: 16516

    Hi Kerry,

    Can I have the login URL too? Thanks!

    #384454

    kerry
    Lifetime Member
    Post count: 138
    This reply has been marked as private.
    #384545

    kerry
    Lifetime Member
    Post count: 138

    Any Luck?

    #384549

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    Code had been entered with an error :

    ‘;}

    after

    if($post->post_region){}

    shouldn’t be there.

    I corrected it.

    Let us know how it goes,

    Thanks

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

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

Open Support Ticket