When writing posts on WordPress or any other CMS, it is a very common task to link to other internal posts. Let’s explore the different ways in which this can be done.
Insert by press [[
By press double the square bracket button in your keyboard, a list of posts box will appear, you just have to type the name of the post you want to insert. For example, this below list is what I’ve done using this technique:
- How to get posts with featured image using WordPress API
- How to insert a box of internal posts in WordPress
Insert anchor link
This is the most common way. You select the text you want it to be the anchor, click on the
Link button or press the shortcut keys: Cmd+K or Ctrl+K
Using Embed Block
If you are using the classic editor, you can simply paste the link into the editor. However, if you are using the Gutenberg editor, there is a block called ‘Embed’ which allows you to easily embed an internal post or external link into your current post. To use it, simply insert the block and paste the link into the designated field.
However, on WordPress sites that are news or magazines, editors often want to insert posts with these specific layouts:
Before Gutenberg, this type of layout was impossible to achieve. However, with the Gutenberg editor, we can now create a similar layout using the default core block Query Loop or other query blocks that are based on it. If you are using the Gutenberg editor, try using Query Loop or search for a plugin that provides a custom query loop block. However, you may soon encounter a pain point: you cannot choose specific posts or reorder them because these Query Loop blocks all have automatic mechanics.
Fortunately, there is a better solution: the Master Embed Posts plugin. This plugin provides a custom block called Master Embed Posts that allows you to insert internal posts with the exact type of layout you desire. You can easily search for and select the posts you want to insert, drag and reorder them, switch to different types of layouts, and even add your own custom styles.
To get started, go to the plugins menu, search for, install, and activate the Master Embed Posts plugin. Then, return to the editor and click the inserter. You should see the Master Embed Posts block appear in the list. Insert the block and toggle the settings sidebar for that block. Search for the posts you want to select, choose the layout you want, and customize it to your liking. You can see a demo of this in action on my own website.