You’ve probably noticed by now that if you paste a link from certain sites (e.g. Twitter, YouTube, etc.), WordPress will embed them automatically into your post or page.

This happens in both Gutenberg and Classic Editor.

Semrush

You can completely disable automatic embeds in WordPress, but what if you want to prevent this only for specific links?

Well, in this tutorial, I’ll show you a workaround!

Prevent Auto-Embedding Links in WordPress

To prevent specific URLs from auto-embedding in WordPress, you’ll have to hyperlink them, as you’ll see below.

For Gutenberg

Step 1

Add a Custom HTML block.

custom html block wordpress gutenberg

Step 2

Add your URL in an HTML <a> tag to create a hyperlink, like this:

gutenberg custom html link

It will output this:

https://twitter.com/Twitter/status/1118295916874739714

As you can see, the Twitter link didn’t get embedded automatically.

Here’s the structure:

<a href="Your link goes here">Add text or plain link</a>

For the Classic Editor

For the Classic Editor is a little bit easier since you don’t need to manually add HTML code.

Step 1

Switch to the Text editor and paste the link. If you do it in the Visual editor, it will get auto-embedded.

Step 2

Select it and hyperlink it by clicking on the link button.

hyperlink in classic editor

Step 3

Change the Link Text if you don’t want a plain link to be displayed.

Now, if you switch to the Visual editor, you’ll see a simple link, nothing embedded.

link visual editor

Easy, right?

That’s a Wrap

I hope you found this tutorial helpful, and you managed to prevent WordPress from auto-embedding your links!

If you have any questions or thoughts, drop a comment or send a message via contact or Facebook page.

You can also hit the follow button on Twitter and subscribe to the YouTube channel.

Don’t forget to share the post to help out others!

wordpress services
contact
subscribe