All Collections
Working with: WooCommerce and WordPress
Adding a Sauce embed to the homepage of your WordPress website
Adding a Sauce embed to the homepage of your WordPress website
James Riley avatar
Written by James Riley
Updated over a week ago

NOTE: This article involves modifying the code of your WordPress theme. This should only be carried out by those comfortable editing code. We provide the following as advice but otherwise cannot provide individual support on installing an embed. That said, do write to us if you're stuck, and we may be able to offer general support.

There are likely various ways to achieve installing an HTML code snippet (a JavaScript script tag) on the Homepage of your WordPress website. We suggest you do your own research as you may find there is a plugin or more convenient approach to achieving this - and should you discover it, let us know! With all this said, let's jump in!

1. Copy your Sauce Embed snippet from the Shoppable Galleries page

2. Head into the 'Theme Editor' of your WordPress website

You'll find this under the 'Appearance' section of your WP Admin:

3. Click to edit the 'Main Index Template' for your theme

Note that the specific file may vary depending on the Theme you are on - in most cases this should be the 'index.php' file.

4. Paste your Sauce code snippet into the Index Template

Importantly here, the precise location you paste the Sauce code snippet will vary depending on the theme you are using - hence the need to be comfortable modifying code. Likely you are going to want the Sauce embed to come after your page content, and so you'll want to look for where in the file the main content ends - this may require some trial and error - be prepared for this. In the case of the 'Twenty Twenty' theme, it helpfully points out where the 'site-content' ends, so here's an example of where it could be pasted:

5. Click 'Update file' to save your changes

And you're done! Viewing your website should now have the Sauce embed loading on your Homepage. Be sure you've taken notes on exactly where you've pasted the code snippet, in the event that you want to remove it.

Did this answer your question?