• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
rahmanzeb.com

rahmanzeb.com

Rahman Zeb's Portfolio & Blog

  • Home
  • About
  • Tutorials
    • Google Sites Tutorials
    • WordPress Tutorials
    • CSS Tutorials
  • Templates
    • Google Sites Templates
  • Portfolio
  • Hire me!
  • Contacts

How to add an image slider or Carousel in new Google Sites

18/03/2019 By Rahman Zeb Leave a Comment

Live Demo

As of March 2019 Google has now officially added image carousel support to the new google sites and you would be able to easily add slideshow to your site via that unless you want something more customizable.

In this tutorial I’ll show you how to add an image slider or carousel in new Google Sites. I am a freelancer and most of my clients asked me to add one to their site. I thought there would be many others who want the same but don’t know how to add it so Let’s get started.

Slick Carousel

There are many great image sliders or carousels out there but I’ll be using slick carousel. I love it and used it for almost all of my clients. And we’ll be using the links from a CDN as google sites does not let us upload scripts or code files to their server.

Add slick.css to your <head> tag

<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/slick/slick.css"/>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/slick/slick-theme.min.css"/>

Adding the HTML part

Just add the html right after <body> tag and keep in mind you gotta include images that are online on another server like imgbb. Google sites let you upload images but you won’t be able to use it even if you fetch the url as they somehow keep changing their urls every 2 or 3 day and thus your slider won’t show the images until you update it again.

<div class="gsSlider">
    <div><img src="https://i.ibb.co/0nJkths/slider6.jpg" /></div>
    <div><img src="https://i.ibb.co/r44fMpf/slider5.jpg" /></div>
    <div><img src="https://i.ibb.co/RTHpRVY/slider4.jpg" /></div>
</div>

Add slick.js and jquery support below the closing body tag </body> in the exact order.

<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/slick/slick.min.js"></script>

Initialize your slider by pasting the code right after the above code

<script type="text/javascript">
    $(document).ready(function(){
      $('.gsSlider').slick({
        dots: true
      });
    });
</script>

Final Code

If done right your final HTML file should look like this except the css part, which is good for you and will make your slider look good because without this css code your carousel will have problems. Just add it as I have added it in the following code.

<!doctype html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Slider</title>
  	<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/slick/slick.css"/>
  	<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/slick/slick-theme.min.css"/>
	<style type="text/css">
		.gsSlider {
			max-width: 1200px;
			margin: 0 auto;
		}
		.slick-next {
			right: 25px;
		}
		.slick-prev {
			left: 25px;
			z-index: 9;
		}
		.slick-dots {
			bottom: 25px;
			z-index: 9;
		}
		.slick-dots li button:before {
			color: #fff;
			font-size: 14px;
			opacity: 1;
		}
		.slick-dots li.slick-active button:before {
			color: #92AD27;
		}
		.slick-dotted,
		.slick-slider {
			margin-bottom: 0 !important;
		}
	</style>
</head>
<body>

  <div class="gsSlider">
    <div><img src="https://i.ibb.co/0nJkths/slider6.jpg" /></div>
    <div><img src="https://i.ibb.co/r44fMpf/slider5.jpg" /></div>
    <div><img src="https://i.ibb.co/RTHpRVY/slider4.jpg" /></div>
  </div>

  <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
  <script type="text/javascript" src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
  <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/slick/slick.min.js"></script>

  <script type="text/javascript">
    $(document).ready(function(){
      $('.gsSlider').slick({
        dots: true
      });
    });
  </script>

</body>
</html>

Adding the final code to New Google Sites via Embed

When you are inside Google sites and are able to edit it you should see the embed on the right hand side or click on the insert tab and you’ll see it there. Refer to the screenshot below if you have problems finding it.

adding image sider or carousel code via embed
Click on the embed at the right to add the final code
Make sure you click on the Embed code tab before adding your code

Live Demo on Google Sites

https://sites.google.com/view/adding-carousel/home

Share this:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on LinkedIn (Opens in new window) LinkedIn

Filed Under: Google Sites Tutorials Tagged With: Google Sites Tips

About Rahman Zeb

Rahman Zeb is a passionate freelance web designer and developer and loves creating awesome and interactive websites. Beside Web design and development he loves to play cricket and badminton with his friends.

Reader Interactions

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Hire Me

zebkhan
Fiverr
Seller
I'm web designer and developer and an expert in languages like html, css, javascript, php & mysql. I also know Joomla & Wordpress and have designed and developed dozens of sites. Most of the sites I have designed were responsive.

Follow Me

  • Facebook
  • X
  • Google
  • LinkedIn
  • Pinterest

Top Posts & Pages

  • How to add typing text effect in Google Sites
    How to add typing text effect in Google Sites
  • How to add click to Call button in google sites
    How to add click to Call button in google sites
  • How to add video background in Google Sites
    How to add video background in Google Sites
  • About
    About
  • Google Sites Templates
    Google Sites Templates

Main Menu

  • Home
  • About
  • Tutorials
    • Google Sites Tutorials
    • WordPress Tutorials
    • CSS Tutorials
  • Templates
    • Google Sites Templates
  • Portfolio
  • Hire me!
  • Contacts

Footer

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 239 other subscribers

Recent Posts

  • How to add typing text effect in Google Sites
  • Top 3 Custom Forms you can use in Google sites instead of google forms for free
  • Add click to chat on WhatsApp & facebook buttons or links in google sites
  • How to add video background in Google Sites
  • Make an image scroll from top to bottom on hover

Best Web Hosting

BlueHost SiteGround iPage Godaddy

Created with Genesis Framework on Wordpress and hosted by BlueHost

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT