• Resolved Christee

    (@cgamron)


    Using the shortcode, if a city has multiple words, the shortcode does not work. For example these cities get errors:

      Port Orford, Oregon
      Winchester Bay, Oregon
      Depoe Bay, Oregon

    Example shortcode:
    [forecast location=”Depoe Bay, Oregon” iconset=”Contemporary” showdata=”highlow,daynames,icon,pop” layout=”table-vertical”]

    It says: The location could not be found.

    This used to work in 1.2.x.

    https://www.ads-software.com/plugins/wunderground/

Viewing 7 replies - 1 through 7 (of 7 total)
  • There is a workaround that was posted by Zack Katz:

    ? Go to Wunderground.com
    ? In the “Search Locations” box, type in your location
    ? Click on the location when it appears in the auto-complete box
    ? When the page loads, copy the URL. It will likely look like this:https://www.wunderground.com/q/zmw:00000.4.17340
    ? Copy the part of the URL after the /q/. In this example, it would bezmw:00000.4.17340
    ? Use that as your location in the shortcode, like this: [wunderground location=”zmw:00000.4.17340″ /]
    ? That should work!

    For Depoe Bay OR, the code is: zmw:97341.1.9999

    Thread Starter Christee

    (@cgamron)

    Thanks, starcloud, but that is not a viable workaround for me. I have a travel site with over 80 destinations, and growing. I use php to dynamically build the shortcode with the city name (which is also displayed elsewhere on the page).

    I can’t manually do that for every page. It worked fine in the older version.

    I do have GPS coordinates, so if there is a way to use those in the shortcode that could be a possibility… otherwise, I need a fix or must stick with the older plugin.

    Thread Starter Christee

    (@cgamron)

    I just looked at the shortcode documentation, and I see lat/long is supported. I’ll give that a try.

    Plugin Author Zack Katz

    (@katzwebdesign)

    @cgamron, glad that works for you. Thanks for your help, @starcloud.

    Thread Starter Christee

    (@cgamron)

    Thank you, @chfriley. Because of this bug, I switched to using lat/long, which I already had stored in another custom field. But the results can be a bit odd since that pulls the weather based on weather station, which means the city name displayed does not always match the city of the location.

    With this fix, I could change back to using city name. (Now, I just need some time to do it. ?? )

    Thanks so much for posting this fix. I was surprised it wasn’t an issue for others – it seemed like such a fundamental issue. I really wish this plugin was getting some support – I’d gladly pay for the plugin if that meant it was supported!

    Zack – Perhaps offer a premium version…? Would that make it worth your time? ??

    I had seen it a while ago and using a different plug, but was migrating a site yesterday and looked at the plugin and saw it was still doing it – I figured rather than just complaining, I’d look at it. ?? It is a change to one line, so is pretty easy. Just took 45 minutes to figure out what the problem was. It has been working on my site. I think I did the pull request on github correctly, ??

    I actually think it may have been a problem for others, but I think if people see something that doesn’t work on a plugin they just switch to a plugin that does work 99% of the time without even asking for support when there are alternatives.

    Assuming the testing for the next week or two goes well and I keep the plugin on this site, I’ll be donating.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Shortcode does not work with multi word city names’ is closed to new replies.