Laef

Portfolio Blog ContactGet in touch
Latest

Sections

  • “The News” videos

Archives

  • October 2021
  • September 2021
  • September 2020
  • August 2020
  • July 2019

Recent Posts

  • Mark Zuckerberg’s Metaverse of Madness
  • VoteMate embeds
  • Tories, Hyphens, and the Political Spectrum – September 5
  • The Coronavirus — Your news for August 19
  • The WE Scandal — Your news for August 4

VoteMate embeds

7 September, 2021 Laef Uncategorized

A few days ago, someone asked me if it would be possible to embed VoteMate’s “Find Your Riding” feature into their WordPress site.

It wasn’t then.

But now it is:

Cool, right? Here’s the HTML:

<iframe src="https://votemate.org/canada2021/land/?a=webembed" style='width:100%;height:300px;border:none;border-radius:5px;'></iframe>

Why an HTML iframe?

While WordPress supports oEmbed, it only supports it for domains whitelisted in the WordPress code. That includes your usual list of social networks, but doesn’t include VoteMate. I could probably write a plugin that would whitelist VoteMate for your WordPress installation, but that seems a little overkill. Next election, perhaps!

How to use this?

If you’re using the fancy new WordPress block editor, just create a new block with the + button, and select “Custom HTML” for the block type. Then paste the above HTML.

If you’re using the old-fashioned WordPress editor, switch to Text mode (instead of Visual), and just paste the HTML where you want it.

Customisation?

You can customise the width and height parameters there to your heart’s content. I’d recommend using percentages wherever possible, so that the iframe will automatically adjust its size to fit the space its given.

Share this with the world, if you're feeling generous

Share on Facebook Share Tweet on Twitter Tweet Share on LinkedIn Share Send via Email Send via Email


Shoot me an email at laef@laef.ca. I look forward to chatting!
© 2023 Laef Kucheran