Key Features
- Embed WordPress posts or WooCommerce products using a lightweight script with a custom optimized REST API
- No iframe, no oEmbed, no third-party dependencies
- Modern card layout that looks great everywhere:
- For posts: favicon, site name, title, excerpt, up to 5 preview images
- For products: featured image, product name, price, sale price (with strikethrough), and “Add to cart” button
- Skeleton loading while fetching data – smooth experience, no flicker
- Auto-detects light/dark mode based on the embedding site
- Built-in modal UI in the editor to generate and copy embed code easily
- Pure Vanilla JS – no jQuery, no external libraries
- Immutable JSON output – perfect for CDN and cache (e.g., Cloudflare)
- Separate scripts:
init-embed.jsfor posts,init-embed-product.jsfor products - Supports
data-type="product"attribute to detect content type in embed code - Optional: auto-insert “Embed Product” button after product meta in WooCommerce
- Includes hooks & filters for developers to customize appearance and data
How to Use
- Activate the plugin as usual
- Add the shortcode
[init_embed_code]in any post or product to display the “Copy Embed Code” button - Click the button → open modal → configure options → copy the code
- Paste the code into any external site where you want to show the content
Example Embed Code
<!-- Embed a post -->
<div class="init-embed" data-id="123" data-origin="https://example.com"></div>
<script async src="https://example.com/wp-content/plugins/init-embed-posts/assets/js/init-embed.js?v=1.3"></script>
<!-- Embed a WooCommerce product -->
<div class="init-embed-product" data-id="456" data-type="product" data-origin="https://example.com"></div>
<script async src="https://example.com/wp-content/plugins/init-embed-posts/assets/js/init-embed-product.js?v=1.3"></script>
Demo: Embedding Posts & Products
You can easily embed posts or products from other sites using a simple HTML snippet. Here’s an example of embedding a post:
Compatibility & Performance
- Requires WordPress 5.5 or higher
- Supports PHP 7.4 or newer
- Works with all popular themes (Astra, Blocksy, Kadence…)
- No custom database tables, no tracking, no bloat
For Developers
init_plugin_suite_embed_posts_rest_response: modify the JSON response of embedded postsinit_plugin_suite_embed_products_rest_response: modify the JSON response of embedded WooCommerce productsinit_plugin_suite_embed_posts_excerpt: customize the excerpt content of embedded postsinit_plugin_suite_embed_products_excerpt: customize the excerpt content of embedded productsinit_plugin_suite_embed_posts_images: override the image list used in embedded postsinit_plugin_suite_embed_posts_favicon_url: change the favicon URL shown in the embed cardinit_plugin_suite_embed_posts_view_count_keys: customize the list of post meta keys used to detect view count (ordered by priority)init_embed_insert_locations: control where the “Copy Embed Code” button appears on the frontend
Explore the The Complete Guide to Init Live Search to dive into detailed guides and advanced use cases.
Get Started
No more outdated iframes or complicated APIs. Init Embed Posts gives you a clean, beautiful, and fully controlled way to share your WordPress content anywhere.
Admin
10/06/2025 lúc 15:45
Live demo right on this page! You can grab the embed code from the post meta (below the featured image) of any post and embed it anywhere you like! 😊