This topic contains 3 replies, has 3 voices, and was last updated by Alex Alex 3 weeks, 6 days ago.

Add line break in address infobox

  • User Level

    Hi I would like to change the way the address is displayed in the info box underneath the map so it reads:

    Store 1

    Test street 1
    324237 Testville

    I know how to change the default order of the address but I do not not have sufficient php knowledge to break the address over two lines.

    The following code located in ssf-wp-xml.php needs to break after ssh_wp_address

    echo '<address>' .ssfParseToXML(__($row['ssf_wp_address'],SSF_WP_TEXT_DOMAIN)) .$addr2.ssfParseToXML($row['ssf_wp_zip']). ' ' .ssfParseToXML(__($city,SSF_WP_TEXT_DOMAIN)). ' ' .ssfParseToXML(__($row['ssf_wp_state'],SSF_WP_TEXT_DOMAIN)).'</address>';

    Alex
    StaffUser Level

    Hi there,

    Thank you for your inquiry, you can try to use code (edit ssf-wp-xml.php) below to add a break line in address infobox:

    * Click the image for larger view

    address_spacing

    • This reply was modified 7 months, 2 weeks ago by Alex Alex.
    • This reply was modified 3 weeks, 6 days ago by Alex Alex.
    • This reply was modified 3 weeks, 6 days ago by Alex Alex.
    • This reply was modified 3 weeks, 6 days ago by Alex Alex.
    User Level

    The code doesn’t work.
    Would be nice to get the correct solution.
    I also need it like glenngtr, because it is the right format in Germany

    Store 1

    Street 10
    12345 City
    State

    I changed the code to this, but there is no break in it..
    echo '<address>' .ssfParseToXML(__($row['ssf_wp_address'],SSF_WP_TEXT_DOMAIN)) . ' ' .ssfParseToXML($row['ssf_wp_zip']) .$addr2.ssfParseToXML(__($city,SSF_WP_TEXT_DOMAIN)). ' ' .ssfParseToXML(__($row['ssf_wp_state'],SSF_WP_TEXT_DOMAIN)).'</address>';

    Thank you

    Alex
    StaffUser Level

    Hi there,

    The break line should be html encoded, we’ve updated the screenshot in previous post.

    Cheers,
    Alex

You must be logged in to reply to this topic.