Skip to main content

Wordpress & Squarespace: Installing buy button code

After you create a Buy Button in your Flaviar admin, you're ready to add it to your own website.

Updated over a month ago

Add embed code to a WordPress post or page

  1. From your WordPress dashboard, go to your posts or pages.

  2. Either create a new post or page, or edit an existing one.

  3. Inside the block editor, click the + button, search for Custom HTML, and then click to insert a Custom HTML block.

  4. Paste the embed code into the text field provided by the Custom HTML block.

  5. Optional: Move the Custom HTML block or preview how your Buy Button will display:

    • To move the Custom HTML block, click the arrow buttons in the block's toolbar, or drag the block to a new location.

    • To preview the Buy Button, click Preview on the block toolbar.

  6. When you're done, click the Save Draft, Preview, or Publish button for your post or page.

If you use WordPress's Classic Editor Plugin, then instead of using a Custom HTML block, change the text editor from Visual to Text mode and paste the embed code in the editor.

Add embed code to a WordPress template

If your WordPress theme supports the site editor, then you can add an Embedded Buy Button to any of your site’s templates.

Steps:

  1. In your WordPress dashboard, go to the Editor.

  2. Navigate to the template that you’d like to edit.

  3. Inside the block editor, click the + button, search for Custom HTML, and then click to insert a Custom HTML block.

  4. Paste the embed code into the text field provided by the Custom HTML block.

  5. Optional: Move the Custom HTML block or preview how your Buy Button will display:

    • To move the Custom HTML block, click the arrow buttons in the block's toolbar, or drag the block to a new location.

    • To preview the Buy Button, click Preview on the block toolbar.

  6. When you're done, click the Preview, or Save button for the template.

Adding embed code to Squarespace

Some advanced customizations on Squarespace are theme-specific. These customizations aren't supported by Flaviar.

Steps:

  1. From your Squarespace dashboard, open the webpage where you want to add the embed code.

  2. Find the element on the page where you want the Buy Button or embedded cart to display, move your cursor over the Page Content area, and then click EDIT.

  3. Click the insert point where you want to add the embed code.

  4. In the More section of the Content Blocks dialog, click Code.

  5. From your Shopify admin, copy the embed code from the Embed Code dialog.

  6. From your Squarespace dashboard, paste the embed code into the CODE dialog. Make sure that the text field is set to receive HTML.

  7. Click APPLY on the EDIT CODE dialog.

  8. Click SAVE again on the page editor. Because Squarespace disables JavaScript in its dashboard, you need to preview your page separately to confirm the Buy Button or embedded cart is working.

If you need help with adding embed code to publishing platforms then contact your website provider or publishing platform directly for support.

If you have any questions please reach out to [email protected].


Did this answer your question?