Winter Study Night

Want to manage content like portfolios, testimonials, events, or products separately from regular blog posts or pages?

đź’ˇ Then, you can do it our way: creating custom post types across your websites!

Custom post types allow you to turn your WordPress site into more than just a simple blogging platform. It can become a fully customized content management system tailored to your needs.

In this guide, we will show you how to easily create custom post types in WordPress.

For example, the canonical URL of this article is the one in your browser’s address bar. If you append /embed/ to the URL, you’ll see how this post looks when embedded.

Essentially, a WordPress /embed/ endpoint serves a slightly different view of the same post.

YouTube works the same way, where you have the main, canonical video URL, such as https://www.youtube.com/watch?v=KLybH5YvIPQ, and the embed version at https://www.youtube.com/embed/KLybH5YvIPQ. Both load the same video, but they use different templates.

A brief history of embeds in WordPress

Since version 2.9, WordPress has used the oEmbed protocol to make embedding content from various services easy. This functionality improved further in version 4.0 with the addition of live previews for embeds in the editor.

With version 4.4, WordPress became an oEmbed provider, allowing other sites to embed posts from WordPress. Version 4.5 further improved embed templating.

Version 5.0 introduced the Block Editor, which came with a dedicated Embed block. Since then, WordPress has continued to add and remove services and make behind-the-scenes tweaks.

The default view

Before you start customizing embeds, let’s break down the default layout.

The WordPress embed looks like a card component that renders the post’s title and excerpt in the main area.