Changing Address Layout

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

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

Open Support Ticket
  • Author
    Posts
  • #231768

    Jimmy Ryan
    Expired Member
    Post count: 202

    I respectfully request guidance where to find the file code containing the listing address. See attached file BEFORE AND AFTER. I would like to set up the listing address as follows:

    Business Name
    Street Address
    City, State ZIP

    I want to be sure to make those address changes so they are not overwritten when the core theme or plugin are updated.

    #231790

    Giri
    Expired Member
    Post count: 3155

    By “Business Name”, I presume you are talking about your listing title.

    If thats the case just paste the following code in your child theme’s functions.php file

    
    
    function cutsom_gd_address_output($html, $variables_array) {
        if (geodir_is_page('detail')) {
            $html = str_replace('<br>', '', $html);
            $html = str_replace('<span itemprop="streetAddress">', '<span style="display: block; clear: both;">' . get_the_title() . '</span><span itemprop="streetAddress">', $html);
            $html = str_replace('<span itemprop="streetAddress">', '<span itemprop="streetAddress" style="clear: both; display: block;">', $html);
            $html = str_replace('<span itemprop="addressRegion">', '<span itemprop="addressRegion" style="display: none">', $html);
            $html = str_replace('<span itemprop="addressCountry">', '<span itemprop="addressCountry" style="display: none">', $html);
            $html = str_replace('<span itemprop="postalCode">', ',<span itemprop="postalCode">&nbsp;', $html);
        }
        return $html;
    }
    add_filter('geodir_show_post_address', 'cutsom_gd_address_output', 10, 2);
    #231974

    Jimmy Ryan
    Expired Member
    Post count: 202

    Hi Giri,

    You are brilliant, dedicated, and offer exceptional customer service.

    God Bless.

    #232086

    Jimmy Ryan
    Expired Member
    Post count: 202
    This reply has been marked as private.
    #232404

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    please provide admin and FTP credentials in a private reply and we will help you fix this.

    Thanks

    #232407

    Giri
    Expired Member
    Post count: 3155

    Jimmy, I’m off Saturday and Sunday. So sorry for the late reply.

    You are having that error because I believe you are using an outdated PHP version.

    Please contact your hosting support and ask your PHP version number.

    If possible ask them to upgrade PHP to 5.6. WordPress recommends PHP 5.6

    https://wordpress.org/about/requirements/

    P.S: if you still face problem after upgrading PHP, please post your FTP, I’ll work on your problem on monday morning.

    Thanks

    #232416

    Jimmy Ryan
    Expired Member
    Post count: 202
    This reply has been marked as private.
    #232448

    Jimmy Ryan
    Expired Member
    Post count: 202
    This reply has been marked as private.
    #232450

    Paolo
    Site Admin
    Post count: 31206

    Thanks for letting us know 🙂

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