How can I get WordPress Embeds to open in a new tab (specifically embedded plugins)

Hi guys,

I’m hoping someone here can help me with something that’s been annoying me for the last 20/30 minutes!

So, in the Gutenberg editor.

If we paste in the URL for a WordPress plugin, like this:


It automatically changes to an embed, that looks like this:


That’s awesome, I like it.

But, how do I get it to **open the links in a new tab?**

I have tried everything I can think of.

Here’s the code when you “edit as HTML” in the editor:



**Actual Code:**

<figure class=”wp-block-embed is-type-wp-embed is-provider-plugin-directory wp-block-embed-plugin-directory”><div class=”wp-block-embed\_\_wrapper”>

Smush – Lazy Load Images, Optimize & Compress Images



I’ll admit, I am a noob when it comes to coding

I did try adding **rel=”noopener”** to different parts of the code, but it kept saying “This block contains unexpected or invalid content”.

I could have been putting it in the wrong place, maybe?

*Or, that’s just totally not how you do it and I’m more of an idiot than I realised! (more likely lol)*


Anyways, I’d love it if someone could help me with this.

I definitely want to use the embeds, but only if they open in a new tab.


Thanks in advance,

Mr C.B.



I am pretty 50/50 if this breaks rule 9 of the sub or not tbh.

But, I’m hoping it doesn’t!

(Rule #9 = No Generic CSS/HTML questions)


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer