How to embed JavaScript and HTML codes in WordPress

What is embed code

Embed code is a short HTML code for you to copy and paste it on your website to embed Youtube or slide show from Linkedin or from any site or application which gives you the embed link to paste on your website. This article shows you how to embed Javascript and HTML codes in your WordPress site using the Code Embed plugin.

Code Embed plugin

Code Embed is a plugin that allows you to embed JavaScript and HTML code easily and practically in your WordPress post without modifying the content. Its key features include

  • Ability to embed widgets
  • Modify the keywords or identifiers used for embedding the code to your o
  • Search for embedding code via a simple search option
  • Adding a simple suffix to the embed code to convert videos to responsive output

Installing and configuring Code Embed Plugin in WordPress

To install and configure the Code Embed Plugin  in WordPress, follow these steps:

  1. Log in to WordPress as the administrator.
  2. On the Dashboard in the left sidebar, click Plugins, and then click Add New:

  3. Search for “Code Embed” click Install Now, and then click Activate the plugin: 

  4. On the Dashboard in the left sidebar, click Settings, and then click Code Embed:

  5. Configure the keyword that you will use to embed the codes. Once this is configured, in the WordPress editor preferences, in the Panels options, enable the Custom Fields:

  6. On the blog post, scroll down to the Custom Fields part. Enter the name and the value, in value enter the code that you want to embed. In this example we will use a simple JavaScript code, but you can embed different codes, such as videos, maps and others.

  7. Save , you will be able to check when viewing the article, in this example the result of the code that has been embedded is shown:

More Information

For more information about the Code Embed Plugin, please visit

Get Managed WordPress Hosting

Article Details

Other Articles in This Category

Show More

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.