Thursday, April 9, 2020

How to Show Random Posts with Thumbnails in Blogger


A hat tip to a post that helped me with setting up a widget to show randomized old posts on the blogger sidebar: https://www.talkofweb.com/show-random-posts-with-thumbnails-in-blogger/. If that's something you are interested in setting up, check out that post. Do note, however, of the one huge caveat if you use that code as is: 


Connection not secure error from Firefox due to randomize posts widget.

The caveat is that with the way java script gets and displays images a "connection not secure" error is triggered. That is not something you would want even if you are blogging on a trusted platform like Blogger. I work around that by taking out the part of the code that generates the thumbnail. I.e.:




The following is what I end up using:

Code for listing randomize posts on blogger.