Adds each post's embed code to the post edit screen for easy copying.
Screenshots
The embed code meta box on the Classic Editor post edit screen.
The full Classic Editor post edit screen (so you can see the meta box in context).
The content block after being added to the post content.
The embed code meta box on the block editor post edit screen.
The embed code being displayed on the frontend inside the post content.
The standard appearance of a WordPress post embed (this comes from WordPress core itself and not this plugin).
FAQ
The meta box is not showing for me – what gives?
The embed code meta box will only show for posts that have a status of ‘published’ – it will not show for drafts or private posts as those cannot be embedded externally anyway.
No really – the meta box is *still* not showing for me!
That’s not even a question, but the answer is most likely that you are using a WordPress version older than 4.4 – the oEmbed feature is only available in WordPress 4.4 and above, so you need to be more up to date in order to use this plugin.
How do I use the shortcode?
The shortcode to display the embed code for a post is [embed_code]
. If used in the context of a post it will show the embed code for that post, but you can also specify a different post using the ID in the post
paramter. Additionally, you can also set a custom width and height for the size attributes of the embed code, with the default being 500 and 350 respectively.
A shortcode with all the available parameters being used will look like this:
[embed_code post=36 width=800 height=400]
How do I remove the styling that comes with the plugin?
There is some very minor CSS included for the frontend display of the embed code (mostly for spacing and alignment), but if you would like to remove that and handle it yourself then simply add this line to your theme’s functions.php file or a custom plugin:
add_filter( 'easy_post_embed_code_use_css', '__return_false' );
ChangeLog
1.1.1
- 2018-12-10
- Improving compatibility with WordPress 5.0+
1.1
- 2018-09-19
- Adding shortcode and Gutenberg block for displaying embed code on the frontend.
1.0
- 2015-11-03
- Initial release.