Thursday, 1 September 2016

Blogger tweaks

This is an interesting one.  By default, Google wants you to use posts on a single blog page, with the option for extra static pages for reference information.

You can use the Page widget in the Layout to create a page using the link of a label search.  This will give what appears to be a page of blog posts on a related topic, but is actually an archive.  Those posts will also show up on the home page.  (Going to the page will give a status message of "you are viewing all the posts with label X" but there's a way to get rid of that.)

To get themed posts to show on a "static" page without showing on the home page as well is more tricky.  There are several ways to do it if you don't want anything on your homepage at all, or want the homepage to be a single, static post (including using custom 404s or page redirects).  To show both - i.e. to have a "normal" blog on the homepage, with "extra" themed posts on their own pages - is non-standard, not how Google wants it to work, and thus requires changes to the HTML of the template, plus JavaScript. I found a nice little tutorial on how to do this, plus how to hide the identifying label from the label widget.  One thing that isn't mentioned in the tutorial is that it doesn't just hide the labelled post: it also hides anything posted the same day (I don't know enough about JavaScript or Blogger to be able to say why).  For the lack of hassle, I'm prepared to just put a different date on a post when using the specific label.

No comments:

Post a Comment