developer-blog-content
developer-blog-content copied to clipboard
How to customize WordPress embeds to match your theme
Discussed in https://github.com/WordPress/developer-blog-content/discussions/297
Originally posted by justintadlock August 28, 2024 WordPress embeds let any WP site's posts be embed anywhere.
But did you know that you can create a custom embed.php template to customize it? There's no block template equivalent, but there are many hooks that you can filter and even load custom CSS to to make it match your theme.
You can even customize the embed code panel:
This tutorial would explore all the various tips, tricks, and techniques to completely customizing a site's embedded posts so that they match their brand/theme when shared on third-party sites.
A lot of the techniques that would be covered (particularly PHP) are covered in this file:
- https://github.com/x3p0-dev/x3p0-ideas/blob/869d801bd7e11dccffb4b344b174c7b52ac89e52/src/Embeds.php