Embedding a Snippet in WordPress

Quick Guide for the Gutenberg Editor
  1. Click Embed Button:
    • Below each snippet is an Embed button. Click it to view the embed code.
  2. Copy the HTML Code:
    • Start by copying the embed code provided. It should look something like this:
      <iframe src="https://shnippet.com/embed/1419/?lang=php" id="shnippet1419-php" max-width="900px" min-width="100%" width="100%" frameborder="0"></iframe><script src="https://shnippet.com/iframe.js" onload="iFrameResize('','#shnippet1419-php')"></script>
  3. Log in to Your WordPress Site:
    • Ensure you are logged into the WordPress admin dashboard of your website.
  4. Open the Post or Page in Gutenberg:
    • Navigate to the page or post where you want to embed the snippet, or create a new post/page by clicking on Add New.
  5. Add a Custom HTML Block:
    • In the Gutenberg editor, click the + button to add a new block.
    • Search for Custom HTML and select it.
  6. Paste the HTML Code:
    • In the Custom HTML block, paste the embed code you copied earlier.
  7. Preview the Embed:
    • You can click the Preview button at the top of the editor to see how the snippet will appear on your site. Alternatively, in the block toolbar, switch to the Preview option to view it without leaving the editor.
  8. Publish or Update: Once you’re satisfied with the placement, either click Publish or Update to save your changes.

That’s it! Your snippet is now embedded on your WordPress page or post using the Gutenberg editor.

So what are you waiting for?

FIND A SNIPPET