>>>>>You can find an updated version here.
As WordPress and Google Drive continue to blend in a variety of ways the desire to embed the contents of Google Drive folders has come up a few times.
I found this Stack Overflow post a while back and had been using it myself. But in an attempt to get around iframe issues and make it a little friendlier I wrote a quick and dead simple plugin today. It seems to do the trick . . .
Directions
Assuming the plugin is installed and activated . . .
Go to Google Docs. Get the unique ID for the folder you want to embed- seen in the highlighted portion of the URL in the image below.
Then paste it between the shortcodes like so . . .
and you get a nice little window that acts as a live interactive portal to the folder.
Good to know you can get around multisite limits on iframes this way. If there were other kinds of things you can embed from gdrive, maybe add an option to the shortcode (default is folder view, leaves room for others) — https://gist.github.com/35370800a2a6b5b65ee9.git
I figured you might have a word of advice. I really want to see that gist but it doesn’t seem to want to load for me.
Using your shortcode, how would I be able to change from list to grid view?
Chris,
That one didn’t have that option but I wrote a new version to do that. It’s slightly different in that the shortcode would be gdrive id=”YourFolderID” style=”grid” (but with square brackets). It works on my quick testing but I wrote it just a minute ago so let me know if it doesn’t do what you’d like.
Is there a way to specify the sort order of the documents? I’m looking for reverse on the title (my titles start with the date like YYYY-MM-DD so the most recent is first) or have the most recently modified at the top (not guaranteed because I might rarely have to modify a previous upload but good enough). Thanks,
I’m not seeing any options that would enable that. Forums seem to say no. I’ve look around a bit at the API and don’t really see that option either. Folders really seem to be treated as an afterthought. If I find anything else I’ll update here.