Ad Inserter
94Manage Google AdSense ads, banners, ad rotation, sticky widgets, AMP ads, ads.txt, tracking, header and footer...
Code Embed provides a very easy and efficient way to embed code (JavaScript, CSS and HTML) in your posts and pages.
Code Embed is a WordPress plugin that allows you to embed JavaScript, CSS, and HTML code into posts without the content being altered by the editor. It is particularly useful for adding third-party scripts and videos. The plugin supports both posts and pages, and requires custom fields to be enabled on your site.
To use Code Embed, you enter your embed code as a custom field in a post and then reference it in your content. This functionality makes it suitable for users looking to enhance their posts with custom code, especially those managing larger sites or needing specific embedding capabilities.
Best for: This plugin is best for users who need to embed custom code in their WordPress posts or pages.
What it does well
Where it falls short
Code Embed provides a straightforward way to incorporate custom code into your content. It is particularly beneficial for those who regularly use third-party scripts or require specific embedding functionalities.
David Artiss's own description of Code Embed, lightly tidied.
IMPORTANT: If updating from an earlier version of the plugin, please check the section named “Plugin Behaviour Changes”, below, for anything which could impact your existing set-up
Code Embed allows you to embed code (JavaScript, CSS and HTML – it can’t be used for server-side code, such as PHP) in a post, without the content being changed by the editor. This is incredibly useful for embedding third-party scripts, etc. The plugin is used by many large sites, including Mozilla.
Key features include…
Iconography is courtesy of the very talented Janki Rathod.
Please visit the Github page for the latest code development, planned enhancements and known issues.
To use this plugin, you need to have custom fields enabled on your site. If you’re using the block editor, you may need to switch this on first – please scroll down to the next section to learn how to do this. If you’re using the classic editor, then you’ll find the custom fields at the bottom of the editor screen.
Although this plugin works for both posts and pages, for simplicity I will simply refer to posts – bear in mind that pages work in the same way.
Once you have custom fields switched on, here’s how easy it is to use…
CODE1 and your embed code as the value.{{CODE1}} where you wish the embed code to appear.And that’s it – when the post is viewed or previewed, {{CODE1}} will be replaced with the code that you asked to be embedded.
This should get you started – for more information and advanced options, please see below. Alternatively, there’s a fantastic guide at Elftronix which I would recommend.
By default, custom fields are hidden inside the block editor but can be revealed.
Other plugins for custom content structures.
Manage Google AdSense ads, banners, ad rotation, sticky widgets, AMP ads, ads.txt, tracking, header and footer...
ACF helps customize WordPress with powerful, professional and intuitive fields. Proudly powering over 2 millio...
Checkout Field Editor (Checkout Manager) for WooCommerce – The best WooCommerce checkout manager plugin to man...
Easily reorder posts, pages, custom post types, and taxonomies with intuitive drag-and-drop sorting in the Wor...
The #1 user-rated activity log plugin for event logging, activity monitoring and change tracking.
Admin UI for creating custom content types like post types and taxonomies