Skip to content

Instantly share code, notes, and snippets.

@aiiddqd
Last active March 13, 2026 05:59
Show Gist options
  • Select an option

  • Save aiiddqd/ef3c772f317a46e6161259b5e5777f2a to your computer and use it in GitHub Desktop.

Select an option

Save aiiddqd/ef3c772f317a46e6161259b5e5777f2a to your computer and use it in GitHub Desktop.
How to Embed a Telegram Post on Your WordPress Site

How to Embed a Telegram Post on Your WordPress Site

In 2026, embedding a single Telegram post (from a public channel or group) into a WordPress site is straightforward. Telegram provides an official widget, and WordPress supports it natively via oEmbed or simple HTML. Here are the two best methods that work reliably today.

Method 1 – Official Telegram Widget (No Plugin Required)

This uses Telegram's built-in embed script – perfect for one-off posts.

Docs https://core.telegram.org/widgets/post

  1. Open the public Telegram post in the app or web version (e.g., https://t.me/channelname/123).
  2. In the browser view of the post, click the <> EMBED button (usually at the top or bottom).
  3. Customize options: width (e.g., 100%), show user photo, dark/light theme.
  4. Copy the generated code. It looks like this:
<script async src="<https://telegram.org/js/telegram-widget.js?22>"
        data-telegram-post="channelname/123"
        data-width="100%"
        data-userpic="true"></script>
  1. In WordPress:
    • Edit your post or page.
    • Add a Custom HTML block (Gutenberg editor) or switch to Text mode in Classic Editor.
    • Paste the code exactly as-is.
    • Save or update the page.

The post renders exactly like in Telegram: text, images, videos, reactions, and buttons included. It's responsive and loads quickly.

Note: Only works for public channels/groups. Private content cannot be embedded.

Method 2 – Recommended: oEmbed Widget for Telegram Posts Plugin (One-Click Magic)

This free plugin makes embedding feel native – just paste the link like YouTube.

Why choose this?

  • No manual code copying.
  • Works directly in the Gutenberg editor (auto-converts on save).
  • Supports posts, channels, and groups via Telegram's oEmbed endpoint.
  • Lightweight and compatible with most themes/builders (Elementor, Divi, etc.).

Installation (under 2 minutes):

  1. Go to Plugins → Add New in your WordPress dashboard.
  2. Search for oEmbed Widget for Telegram Posts (author: aiiddqd).
  3. Install and activate it.

How to use:

  • Edit any post, page, or block.
  • Paste the full Telegram post URL on its own line:
<https://t.me/channelname/123>
  • Press Enter or save/update → it automatically turns into a clean embedded widget.

Plugin link: https://wordpress.org/plugins/oembed-widget-for-telegram-posts/

Quick Tips for Best Results

  • Full width & responsive: Use data-width="100%" in manual code or rely on the plugin.
  • Dark theme: Add data-theme="dark" to the script tag.
  • Want the entire channel feed? Try plugins like WP Telegram Widget or third-party services (e.g., SociableKIT).
  • Performance: Embeds are lightweight; clear cache if using WP Rocket, LiteSpeed, etc., after adding.
  • SEO: Embedded content is visible to search engines and shows nicely in social previews.

Enjoy! 🚀

@aiiddqd
Copy link
Author

aiiddqd commented Mar 12, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment