• Resolved Hjsurk

    (@hjsurk)


    Hello,

    I can’t get the address format to work correctly, even when adding a new address format through the functions.php.

    I have chosen for (city) (state) (zip code) but when I look at the front-end I get the following (city)(state)(zip code) which looks like DrontenFlevoland8313 AL instead of Dronten Flevoland 8313 AL.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    What’s the exact code you added to the function.php?

    Are you also using a custom template? If so, then also please share that code.

    Don’t past all the code here, but create a gist on Github.

    Thread Starter Hjsurk

    (@hjsurk)

    Hello,

    I am not using a custom template. I tried using this function without success:
    https://gist.github.com/anonymous/0de041caff67cd719dd5d12d1fda5035
    Just seems to add the option in the dropdown without changing anything, not even translating with the rest of the options.

    Probably using the wrong function for that, but the main problem is not having any spaces at all in the standard choices.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    The code is fine, but I can’t replicate the issue with a default theme.

    I do see spaces between the city / state and zip code.

    Can you test with a default WP theme, and all other plugins disabled to rule out another script is messing with the output.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    You can also use this filter to overwrite the default search template and include the spaces yourself.

    Copy the code from the usage section and place it in the functions.php inside your active theme folder. Instead of ” . wpsl_address_format_placeholders() . ” on line 15 you can include <%= city %>, <%= state %>, <%= zip %>.

    • This reply was modified 7 years, 1 month ago by Tijmen Smit.
    Thread Starter Hjsurk

    (@hjsurk)

    Hello Tijmen,

    Thanks for the suggestions. Disabling WP Super Minify did the trick!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Address format not working correctly’ is closed to new replies.