Embed HTML code
You may find yourself needing to embed something on your page. You have a chunk of HTML code. This could be for a variety of purposes:
- Web forms
- Facebook feed
- RSS reader
- Third-party widget
If you need to embed a chunk of HTML code on your web page, start by logging into your page. You will probably be on the Visual editor by default. Switch to the Text editor by clicking on the “Text” tab:
Go to the place on the page where you want to put your embed code, and paste the code there.
Update your page and you should see the product of your embed code displaying there.
The important thing to know is this: you must be in the Text view to paste HTML code. If you paste HTML code in the Visual editor, the HTML code itself will display on your page, not the widget or form or whatever it is that the HTML code is supposed to produce.
Embedding from social media
WordPress allows you to easily embed from social media without using any special code. Simply put the URL on your page, on its own line, without any hyperlink or special formatting, like this:
Update your page and you should see your YouTube video or Facebook post or whatever it is embedded beautifully on your page. You can use this method for
- YouTube
- Vimeo
- Flickr
- Soundcloud
- and more!
When not to embed
Be smart about what you embed on your page. Here are some tips to follow:
- Trust – Only embed widgets or feeds from websites or organizations you trust.
- Is it helpful to the user? – Embedding a Facebook widget can a good alternative to simply adding a link to your Facebook page because someone can become a fan right from the widget, rather than having to go to Facebook.
- Is it relevant? – Embedding a Facebook feed for your organization helps your visitors see your recent activity and gives them an opportunity to connect to your organization through social media. But a widget showing the local weather conditions? That’s not relevant. They’re not going to your site to find out about the weather–they know where to get that information.
- Avoid clutter – Just because you can have a widget on your page doesn’t mean you should.