• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Amanda Webb Spiderworking - Google Analytics Setup and Training | Digital Marketing Measurement Support

Your Friendly Google Analytics Geek | Taming GA4 One Report at a Time

  • Tel: 085 113 7542
  • Home
  • About
  • Work With Me
    • Google Analytics Done-for-you
    • Training & Mentoring
  • Speaking
  • Blog
  • Get In Touch
You are here: Home / Blogging / Wordpress Tutorial: Embed HTML in Posts & Pages with ‘HTML Snippet’ – Cool Tool

WordPress Tutorial: Embed HTML in Posts & Pages with ‘HTML Snippet’ – Cool Tool

March 31, 2014 by Amanda Webb

Share
Tweet
Share
Pin
Email
WhatsApp
photo credit: Liamngls via photopin cc

Adding embed code to a WordPress self hosted post can be hard work. It seems simple. You copy the code, click on ‘Text’ and paste in the code. It looks great, briefly. Problems start arising if you schedule your posts or edit them. Sometimes the embeds just disappear.

In this WordPress tutorial I’m going to show you how to use the HTML Snippets plugin. It allows you to easily add a snippet of code to your posts and pages. It’s particularly good if you need to add recurring code like the banners at the bottom of this blog post.

It’s also useful for adding any embed code to a blog for example:

  • Email sign up forms
  • Youtube video
  • Slideshare presentations
  • Sharing your own embed code with others

Here’s how it works

1. Install the plugin

Log in to your website and click ‘plugins’ on the left hand menu. Choose ‘add new’

Search for ‘Insert HTML Snippet’

Wordpress Tutorial: Embed HTML in Posts & Pages with 'HTML Snippet' - Cool Tool

Click ‘Install now’

2. Add your embed code or HTML

Once you have installed the plugin click the ‘XYZ Html’ menu on the bottom of your left hand sidebar.

Wordpress Tutorial: Embed HTML in Posts & Pages with 'HTML Snippet' - Cool Tool

Now you can add your code.

In the example I am adding a banner that will advertise the We Teach Social ebook.

Click ‘Add new HTML snippet

Wordpress Tutorial: Embed HTML in Posts & Pages with 'HTML Snippet' - Cool Tool

In ‘Tracking name’ give your code a title that you will recognise later on.

In the HTML code box paste in your embed code. If you want to create your own HTML code like I have but haven’t used HTML before check out W3 Schools.

Wordpress Tutorial: Embed HTML in Posts & Pages with 'HTML Snippet' - Cool Tool

**If you want to create a clickable banner like mine upload an image to ‘media’ and edit the code below:**

Once you have added your code click ‘Create’.

Your snippet will be displayed in the menu. You can edit, pause or delete the snippet from here.

Once you have added your code click 'Create'.

3. Add code to posts or pages

Now create a new post or page as usual.

Click on the blue ‘HTML’ symbol in the toolbar and choose your snippet from the drop down menu.

Once you have added your code click 'Create'.

This inserts ‘shortcode’ into your post. WordPress will recognise this and add your embed code at this point.

Save and publish your post as usual. Your embedded code will appear wherever you inserted the shortcode.

See my banner below and the pastebin embed above for examples.

I really like this plugin, I’ve been using it for a while and it’s saved me loads of time. It’s convenient for adding recurring code to posts, like the banner images.  As you can edit the snippets once you have created them it is also really easy to replace all the banners with something else if you want to promote something new.

The one downside is that it’s a bit clunky if you want to add code just once to one post. You could end up with a huge menu of snippets.

If you enjoyed this blog post why not subscribe to my newsletter or my blog posts via email. Click here for more info.

Master Social Media one day at a time with the We Teach Social Kindle book I co-authored.

“365

Related Posts:

  • A woman with strawberry blonde hair, styled in a bob with bangs, looks surprised and amused as she scrolls endlessly down a very long web page on a laptop. She's wearing a bright orange jacket over a yellow top. Beside the laptop, her calico cat watches the screen with wide eyes and a raised paw. Floating above them are large black question marks and a speech bubble that reads ‘Still scrolling?’ The background is split: the left side is orange with halftone dots, and the right side is blue with halftone dots. The image has a vibrant, playful comic-book feel.
    Are Long Sales Pages Worth It? How to Track What…
  • Frustrated marketer analysing blog performance in Google Analytics 4 with question marks above her head
    How to Measure Blog Performance in Google Analytics 4
  • cro-for-low-traffic-websites-Usman-Qureshi
    Optimising Low-Traffic Websites: Practical CRO Tips…
  • Amanda a red headed 50 year old woman squints at a yellow measuring tape she has extended
    How to Measure Your Black Friday Campaign Success…
Share
Tweet
Share
Pin
Email
WhatsApp

Filed Under: Blogging, tools Tagged With: embed code in wordpress, plugin to embed code on wordpress, wordpress plugin

Primary Sidebar

Work With Me

From Google Analytics Training to the ROI Escalator Programme. Find out how I will help you get more ROI for your business

Amanda, smiling with red hair draped over her shoulders. You can trust her (but I would say that wouldn't I)

Get ROI Help Straight To Your Inbox

Get daily tips and inspiration on how improve your digital marketing ROI using analytics

Privacy Policy

Let's Connect

let's connect on LinkedIn Subscribe on YouTube Follow on Facebook

Footer

Google Analytics Certified
Very Blog Awards Winner
Social Media Examiner Winner
Social Agency Scout
  • Done For Your Google Analytics 4 Packages
  • Training & Mentoring
  • Speaking
  • That Analytics Podcast – Learn to love your stats
  • FREE Webinar: Finding the Gold in Your Google Analytics
  • Get In Touch

© Copyright 2017-2024 Spiderworking.com - Social Media For Small Business · All Rights Reserved · Privacy Policy · Cookie Policy · Maintained by FlyingFish.ie