Git Product home page Git Product logo

simple-google-photos-grid's Introduction

Simple Google Photos WordPress Plugin

Get the plugin here. Provides a WordPress widget and shortcode to display photos from a public Google Photos album. See a demo and read more about the plugin.

Installation

Install as you would any other WordPress plugin.

Widget

Go to Appearance -> Widgets and a new widget named Simple Google Photos Grid should be available to use. Drag to your desired widget area and configure.

  • Title: Heading of the widget on your site. Default to empty.
  • Album URL: The full URL to your public gallery on Google Photos. Ideally should be a short, "shared" link (such as https://photos.app.goo.gl/G8EOLs5YtESchh4g1), but any Google Photos URL should do.
  • Num Photos to Show: Even numbers probably work best. There's a maximum number, not sure what it is, but it's pretty low.
  • Num Photos per Row: How many photos to show per row? Probably some number that works well with Num Photos.
  • Cache Interval (in minutes): How long to cache photo URLs before checking the album on Google again. 0 for no cache.

Shortcode

Place the shortcode in a post, page or theme. [simple_google_photos_grid album-url="https://photos.app.goo.gl/G8EOLs5YtESchh4g1"]

Available attributes are:

  • album-url: (required) the url to a public Google Photos album
  • number-photos: (optional) number of photos to display, defaults to 4
  • number-photos-per-row: (optional) number of photos per row, defaults to 2
  • cache-interval: (optional) length, in minutes, to cache the photo urls retrieved from Google, defaults to 15

[simple_google_photos_grid album-url="https://photos.app.goo.gl/G8EOLs5YtESchh4g1" number-photos="6" number-photos-per-row="3" cache-interval="120"]

Notes

Your album on Google Photos must be "public", which means you need to go into Google Photos on the web and set "Sharing options" to on, i.e. "Anyone with the link can see these photos and the people who've been invited or joined."

Google Photos Public Sharing Settings:

Required settings for a Google Photos album to be public and accessible by the Simple Google Photos Grid WordPress plugin.

This plugin is pretty hacky since the above doesn't really make the album public in the sense that Picasa used to, or Flickr does, etc. Anyway, there is no reliable Google Photos api. The Picasa API is broken and doesn't list new albums made in Photos, and not all albums show up in Google Drive. So, read this and this if you're interested in this mess.

Finally

No support is provided. Probably no features will be added. You are free to ask, or to fork. Pull requests accepted.

simple-google-photos-grid's People

Contributors

datvance avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.