Support » Plugin: LDD Directory Lite » Editing address layout

  • Resolved ydcommunity

    (@ydcommunity)


    Hello,

    We have opted to not use the Google Maps integration in our Directory however, we would still like to display the City, Province/State, Country in each listing. I am trying to remove the comma that exists before the city as we don’t want to display street address or postcode.

    Could you lead me to where I can manipulate the CSS for this in the template files? I have removed the option for anyone to submit the address, postcode in the Submit Listings form.

    Thanks for your help!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author LDD Web Design

    (@lddwebdesign)

    I believe the output you are referring to is generated in the plugin’s functions.php file (ldd-directory-lite/includes/functions.php). I’ll confirm this with our programmer and get back to you.

    @lddwebdesign thank you for the quick reply! I’ll wait to hear back.

    we use filter to make changes to address. you can use following function in your theme function.php

    function ldd_modifiy_address( $output ) {
    $post_id = get_the_ID();

    if (!is_int($post_id))
    return false;

    $city = get_post_meta($post_id, ldl_pfx(‘city’), true);
    $state = get_post_meta($post_id, ldl_pfx(‘state’), true);

    $country = get_post_meta($post_id, ldl_pfx(‘country’), true);

    $output = ”;

    $output .= empty($city) ? ” : $city;
    $output .= empty($state) ? ” : ‘, ‘ . $state;

    $output .= empty($country) ? ” : ‘, ‘ . $country;
    return $output ? $output : false;

    }
    add_filter( ‘lddlite_presentation_get_address’, ‘ldd_modifiy_address’,10,1 );

    ydcommunity

    (@ydcommunity)

    Great! This worked thanks.

    @suffrage a follow up question to this, can I alter the text size of the address through the functions.php as well? Thanks.

    Plugin Author LDD Web Design

    (@lddwebdesign)

    You should be able to do this via css.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Editing address layout’ is closed to new replies.