Skip to main content

HTML Based Accessories, For Individual Posts

Blog owners are constantly asking how to add post specific accessories, from third party services.
How do I add a Like button, for my posts?
Adding many post accessories requires adding XML code, to the post template.

Adding code to the post template is scary - and it can cause problems, when incorrectly done. The easiest way to add a per post accessory is to add an HTML gadget that references the post by the URL, as displayed for the page.

The problem with an HTML gadget is that it simply references the page displayed. If your posts are read from the main page, or an archive page - and somebody uses a Like accessory, what happens?

A Like button, used from an HTML gadget with the main page displayed, applies to the blog - since it's the main page that's displayed.

If you want your readers to Like your individual posts, they need to use the Like button with the post page displayed. You need three tweaks, for this to work best.
  1. Use Jump Break on the posts.
  2. Tweak the Like gadget, so it only displays in a post page.
  3. Add a second Like gadget, in the sidebar, to apply to the blog.

Use Jump Break on the posts.
With Stats displays and main page content, you get the most accurate post pageview counts when your readers read each individual post. Similarly, encouraging your readers to Like your individual posts will be more successful when the Like is used from the post page.

A Jump Break, added to each post, will encourage the reader to click to the post page, where the Like gadget will be visible, immediately beneath the post. Clicking on the button in the gadget, the Like is applied to the post.

Tweak the Like gadget, so it only displays in a post page.
If you want reliable individual post Likes, you want a Like gadget that is only visible from the post page. You can add a CSS tweak, using the Template Designer "Add CSS" wizard.

Add a second Like gadget, in the sidebar, to apply to the blog.
You can have Likes that apply to a main page - but what happens when a non home, index page is displayed? Have you ever looked at the non home URL, for a secondary main page segment?

Add a second Like gadget, in the sidebar, to pick up the home page of the blog, instead of the current page. Then, tweak that gadget, so it only displays on an index page - again, using CSS.

And, you're done.
When all of this is done, you'll have two Like gadgets - one that applies to the blog, the other to the individual posts. And your readers will read each post from the post pages. And you'll do all of this, without tweaking the post template.

Comments

Popular posts from this blog

Custom Domain Migration - Managing The Traffic

Your blog depends upon traffic for its success.

Anything that affects the traffic to your blog, such as any change in the URL, affects the success of your blog. Publishing the blog to a custom domain, like renaming the blog, will affect traffic to your blog. The effects of the change will vary from blog to blog, because of the different traffic to every different blog.Followers. People who find your blog because of recommendations by other people.Search engines. Robotic processes which methodically surf your blog, and provide dynamic indexing to people who search for information.Subscribers. People who read your content from their newsfeed reader, such as the dashboard Reading List.Viewers. People who read your content from their browser.No two blogs are the same - and no two blogs will have the same combinations of traffic sources.

Stats Components Are Significant, In Their Own Context

One popular Stats related accessory, which displays pageview information to the public, is the "Popular Posts" gadget.

Popular Posts identifies from 1 to 10 of the most popular posts in the blog, by comparing Stats pageview counts. Optional parts of the display of each post are a snippet of text, and an ever popular thumbnail photo.

Like many Stats features, blog owners have found imaginative uses for "Popular Posts" - and overlook the limitations of the gadget. Both the dynamic nature of Stats, and the timing of the various pageview count recalculations, create confusion, when Popular Posts is examined.