• Resolved scormeny

    (@scormeny)


    I am posting this in the hopes that it is useful to other people.

    The “address” tag is reserved in HTML5 for a very specific purpose, which for many users doesn’t meet their need with this plugin. Most browsers behave strangely when they get to an “address” tag and that is causing extra paragraph returns to show up in the output for many users, it seems.

    However, this plugin does not really require that a user use the “address” tag. You can create your own dedicated tag, and make a small alteration to the .js file that comes with this plugin, replacing the word “address” with your new tag name (I used the name “addr”).

    Now, if I want to have an address inline in my text, converted into a Google Maps hyperlink, I put “addr” tags around it and it looks perfect in my final output.

    For instance, I go to the text editor for my post and enter:
    Restaurant name, <addr>123 Main Street, Anytown, MI 12345</addr>

    And it creates the html output I want:

    Restaurant name, 123 Main Street, Anytown, MI 12345

    I think this would meet most users’ needs and since there doesn’t seem to be any further activity by these developers, I offer it as an acceptable kluge in case it’s helpful to you.

    https://wordpress.org/plugins/convert-address-to-google-maps-link/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Toby Cryns (@themightymo)

    (@themightymo)

    scormeny,
    Thanks for that info. I’m not sure I follow you, though, and I’m hoping you can help me understand the issue with using the “address” tag.

    Is the issue simply that the address tag adds line breaks in some browsers? If so, I can fix that with some css in a future release. Are there any other issues with using the address tag from a semantic or best-practice perspective? I don’t keep up with all the html5 discussions, so I’m hoping you can help me better-understand.

    http://www.w3schools.com/tags/tag_address.asp

    Thanks!
    Toby

    Plugin Author Toby Cryns (@themightymo)

    (@themightymo)

    I thought about this last night, and I think if you are already using the html5 address tag, the plugin’s current functionality makes a lot of sense. If, on the other hand, you just want to inject the Google map link functionality into a paragraph or something like that, we will need another way to handle that.

    Your thoughts about the “addr” html markup got me thinking… The concept is sound, however, I’d prefer to use a css class rather than made-up html markup. So, I will release a new version of the plugin shortly that converts “.address” classes the same way it does with the html5 “<address>” tag, only when you use the “.address” class, it won’t add a line break. This way, you could use “<span>”, “<div>”, etc. and the functionality will work.

    Thanks for the idea and feedback!

    Toby

    Thread Starter scormeny

    (@scormeny)

    Thanks, Toby.

    Best of luck with the work on this. I agree with your statement about just injecting the Google Map link functionality into a paragraph — it needs to be handled differently.

    I’ll look forward to your updated version and a chance to check it out.

    I am also going down the path of looking at microdata for street addresses on my site (my site is an events-promotion site, so we carry addresses of lots of venues), and whether I can find a plugin for functionality to hyperlink those to Google maps. It seems like a no-brainer in some ways, but a harder nut to crack than I thought when I got started! Your plugin, modified as you suggested, is a much easier-going solution at this time.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changed "address" to "addr" to get it to work for me’ is closed to new replies.