Tuesday, August 2, 2011

Hiding Contents in Blogger

Sometimes there are just things in a blog post that you want to keep to yourself. For example, occasionally in a post I would want to make an snide comment, and I wouldn't want the readers to see that comment for fears that they may get offended by it. At the same time, however, I would still want to be able to see the comment myself, for it may be needed for future references or other purposes.

Unfortunately, Blogger does not have a feature where you can make certain parts of a post viewable only to yourself, and as a result hiding contents in a post is not as easy and convenient as it could be.

Fortunately, however, I have come up with two methods to accomplish this task. And in the rest of this post I will describe them in detail.

Saving as a Draft
The easiest way to do this would be to create two separate posts: one will contain only the things you want others to see, and the other would contain everything you want to see. Then, you can simply publish the first post and save the second as a draft. The others will be able to read the published post, and only you would be able to see the contents of the draft.

One huge disadvantage of this method is that it would be very inconvenient if you want to edit your post later on. Every time you want to make a change, you would have to go through the two copies and edit them separately, and this could be a long and boring process. Of course, if the changes are minor, you may decide to just edit the published post.

Using certain HTML tags
Contents in between certain HTML tags would not show on the page. For example, if you add the below HTML code into your blog post (edit HTML), it would appear as if nothing has changed:

You could therefore use this to your advantage—you can use the above code as a content-hider! To do this, simply copy and paste the HTML code into the HTML editor of your post, then change the content in between the squiggly brackets. Alternatively, instead of using the squiggly brackets, you can use an end tag, like this:

Be careful though: if you use this method, it is still possible for the readers to see the hidden content. They simply have to view the page source of the blogger post, and they will see all the HTML code of your post, including the hidden content. So do not use this method if you think your readers are likely to view the page source of your blog.