Embedding Multiple Widgets on a Single Page

How to tweak your Widget embed codes to support multiple Widgets on a single page

NFT.Kred Widgets use targeted DIV IDs to load the Widget contents into the necessary DIV, which is included in the Widget code that you will copy during the Widget customization process.

If you wish to embed multiple Widgets on a single web or app page, the DIV ID for each embedded Widget must be unique.

Below we will show you how to customize your Widget code to prepare for multiple Widget embeds on a single page:

  1. Here is an example Widget code which has been unmodified:

    <div id="widget-iframe" style="height:100%"></div><script type="text/javascript" src="https://static.socialos.net/inspinia/html/widgetWrapper/widgetsWrapper.js"></script><script>KredNFTWidget({"domain":"your-domain.kred","widgetName":"explore","root":"widget-iframe"});</script>
  2. Note how the DIV ID “widget-iframe” is referenced at both the start and end of the code snippet.
  3. To update this Widget code so it can be embedded on a page with another Widget, make the DIV ID unique. The DIV ID referenced twice in a single Widget code snippet must match. Here is an example:

    <div id="widget-iframe-2" style="height:100%"></div><script type="text/javascript" src="https://static.socialos.net/inspinia/html/widgetWrapper/widgetsWrapper.js"></script><script>KredNFTWidget({"domain":"your-domain.kred","widgetName":"explore","root":"widget-iframe-2"});</script>

    In this example we have changed the DIV ID to “widget-iframe-2”

This Widget code is now ready to be embedded on a page that contains an additional widget embed.