How to anchor to embed video

[ad_1]

How do I create an anchor link from the Test text to the embed content? I tried adding an id=”03T” inside of the div within the embed comment block. However, when doing that I am unable to see the embed block in the visual editor.

<!– wp:paragraph –>
<p><a href=”#03T” data-type=”internal” data-id=”#03T”>Test</a></p>
<!– /wp:paragraph –>

<!– wp:heading –>
<h2>Videos</h2>
<!– /wp:heading –>

<!– wp:embed {“url”:”https://player.vimeo.com/video/25323516?”,”type”:”video”,”providerNameSlug”:”vimeo”,”responsive”:true,”className”:”wp-embed-aspect-4-3 wp-has-aspect-ratio”} –>
<figure class=”wp-block-embed is-type-video is-provider-vimeo wp-block-embed-vimeo wp-embed-aspect-4-3 wp-has-aspect-ratio”><div class=”wp-block-embed__wrapper” id=”03T”>

</div></figure>
<!– /wp:embed –>

Any ideas on what could be fixed to insert the anchor link and see it visible in the visual editor?

[ad_2]
3 Comments
  1. I don’t think i understand what you mean clearly, Seems like you’re adding a link in the gutenberg paragraph block “#03T”. Can you achieve this via rich text formatting?

  2. HTML specs say IDs must not start with a number. `id=”03T”` would be invalid and could be the source of your issue.

 

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