Skip to main content
All CollectionsInstalling SnapWidget on your website
How do I add an Instagram widget to SnapPages in 2022/2023?
How do I add an Instagram widget to SnapPages in 2022/2023?

Find out how you can add SnapWidget to your SnapPages website💡

Herman Schutte avatar
Written by Herman Schutte
Updated over 2 years ago

Adding your Instagram, Facebook or Twitter widget to your SnapPages website is easy. Follow these steps to create your widget:

Once you've created your widget, follow the appropriate steps below to add it to your website.

  1. Log in to your SnapPages website, go to your Dashboard and click on Pages.

  2. Click on the ellipsis menu next to the page you want to add the widget to.

  3. Select Edit to open the page in the editor.

  4. The selected page will be displayed in editor mode with items on the left sidebar allowing you to add sections and blocks to the page. In the main section we have added 2 text box blocks and a divider.

  5. We will add the Code block beneath the last text box. You can of course add more sections and add the Code block in any section.

  6. Click on Blocks in the left sidebar menu to add a new block to the section.

  7. Select the Code block and drag it on the section.

  8. SnapPages allows you to create named code snippets, i.e. you can store all your code snippets with a Title to be used elsewhere on your website.

  9. In the Add Custom Code dialog box, select the option you want to use.

  10. If you haven’t created a code snippet yet, choose the Create New option. Using this option allows you to name the code snippet for later reference. You don’t have to enter a name but then only the last one created will be stored with a Title “New Code Snippet”.

  11. When the Code Editor opens up, enter your snippet into the Code box.

  12. When done, click on Save at the bottom of the page.

  13. This will save the contents of the Code Editor box and return to the Page editor and indicate that a Code Snippet was entered.

  14. You can click on Preview to see what the widget will look like on your page.

  15. This will indicate that you need to save the changes you made. If you want to continue previewing just click on Save and Preview.

  16. Your widget will fill the available area, set by the iframe width in your snippet.

  17. You can change this to e.g. 50%.

  18. This will then display the widget smaller. If you make the iframe width too small, thus making the actual width of the images too small, you won’t be able to click on an image to display it in a lightbox and you will also not be able to click on the social media buttons if you had them set up in your widget on your SnapWidget dashboard. Try to keep the width > 35%.

  19. The following is done with a width of 35%.

  20. Clicking on an image will display it in a lightbox.

  21. On the Preview page you will be also able see what your page will look like in the different formats (responsiveness), i.e. Desktop, Tablet and Mobile. This also applies when you work with your Slideshow Widget.

Adding your Slideshow display widget

  1. The process of adding the Slideshow Display widget is the same as the Grid Display widget. The major difference that could be addressed is the fact that the grid contains more than one static image and the Slideshow Display displays only one image at a time. The factors mentioned for the Grid Display such as size and justification need a different set of modifications.

  2. Select the Slideshow Display page to open in the Page Editor.

  3. Insert your Responsive Slideshow Display widget snippet the same way we added our Grid Display widget snippet.

  4. This will display the widget as follows on your website page.

  5. The widget is displayed with an iframe width of 100% but it is left justified. You can’t change the width nor the justification with the standard Responsive Slideshow widget. If this layout suits you, skip the next steps.

  6. To enable us to change the width (and height to keep it at a 1:1 ratio) we will have to make some changes to our widget.

  7. Create a non-responsive widget on your SnapWidget dashboard. The width and height are not important, you can set them to e.g. 200px each. Although the thumbnail size (in px) is important because it will be used in the iframe width and height setting in your snippet, you can change this in the code snippet when entered in the Code box. This change will then only be applicable to this SnapPages instance of your widget. If you use your widget on any other website (CMS, E-Commerce or Blog) it will still utilize the Thumbnail setting as set up on your SnapWidget dashboard.

  8. We are going to add some HTML and CSS code to our snippet to create an area where the snippet will be displayed. The area will be basically as follows:

  9. This gives us control over the width, height and the justification of the widget. It also causes the non-responsive widget to become responsive.

  10. The standard non-responsive widget snippet contains the following:

  11. With the iframe width and height setting to 200px, your widget will be displayed as follows.

  12. At first glance this looks fine, but it is too small. Even if you increase the height and width, the widget won’t be responsive.

  13. Make the following changes to the snippet.

    • Add 2 <div> areas with the following styles (the ids are just for explanatory purposes for this tutorial, they are not used for any other purpose so you can actually leave them out).

      • <div id=”Wrapper” style=”width: 20%; margin: 0 auto;”>

      This sets the Wrapper to 20% of available width and center-justified. With this width setting we can change the width of the snippet to any width we want but please note that if you make the width < 20% the social media buttons won’t be displayed properly on the images and you won’t be able to click on an image to display it in a lightbox.

      • <div id="Container" style="top: 0; height: 0; width: 100%; padding-bottom: 100%; overflow: hidden; position: relative; margin: 0 auto;">

      This sets the area used to display the iframe at 100% of the Wrapper width as well as height = 100% of the width.

    • Remove the width and height attributes of the style part of the iframe and replace them with the indicated attributes (left: 0; width: 100%; height: 100%; position: absolute;)

  14. This will then display the widget as follows with the ‘Wrapper’ width set to 20%. The widget will also be responsive.

  15. Clicking on one of the images displayed in the SlideShow will display that specific image in a Lightbox display.

Did this answer your question?