Change displays in GD Supreme

This topic contains 2 replies, has 3 voices, and was last updated by  Stiofan O’Connor 8 years, 1 month ago.

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

Open Support Ticket
  • Author
    Posts
  • #237323

    Spotlight
    Free User
    Post count: 9

    I would like to change how the listing information is displayed in the search results and also in the listing detail.

    I anticipate just moving fields around, and reducing the size of the listing icon.

    For example in the list view:

    111 Street
    Yourcity
    MA
    02333
    United States

    might be changed to:

    111 Street, Yourcity
    MA 02333 United States

    Should be fairly simple for someone who knows what they are doing. I don’t.

    Contact me with your hourly rate and experience with GD Supreme.

    #244043

    Jimmy Ryan
    Expired Member
    Post count: 202

    I encourage you to use an appropriate USPS mailing address format such as:

    123 Easy Street
    Anytown, MA 02333

    See below the modification code you will want to include in your Dashboard click on Geodirectory click on THEME COMPATIBILITY and scroll down to css section down below:

    1. Get rid of the COUNTRY because USPS does not display a country in the mailing address.
    Copy and Paste to css below:
    #geodir_post_country_row {display: none !important;}

    2. Realign the format of your remaining address:

    MAKE A BACKUP OF YOUR FTP, SQL, AND THEN MAKE YOUR CODE CHANGES:
    Go to FTP and download a functions.php file in your supreme theme folder. Copy and paste code below to the bottom of your functions.php file. Remember to go back to your FTP and rename your original functions.php file to FUNCTIONS-ORIGINAL.php before you upload the revised functions.php file so you do not overwrite your original functions.php file.

    //MODIFY BUSINESS ADDRESS ON LISTING DETAILS PAGE

    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 .= ‘ ‘;
    $html .= ‘</span>’;
    //print_r($_POST);

    $html .= ‘<br>’;
    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>’;}
    $html .= ‘</p>’;
    }

    return $html ;
    }

    //END OF MODIFY BUSINESS ADDRESS ON LISTING DETAILS PAGE

    Best of luck.

    #275734

    Stiofan O’Connor
    Site Admin
    Post count: 22956
    
    
    .geodir_more_info.post_address br {
        display: none;
    }
    .geodir_more_info.post_address span:after {
        content: ", ";
    }
    .geodir_more_info.post_address span[itemprop="streetAddress"]:after {
        content: ", ";
    }

    The above CSS should give the layout u want.

    Thanks,

    Stiofan

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

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount