How to make Blogger sticky post using a gadget

Posted by muamar Saturday, June 8, 2013 0 comments
I have this other sticky post hack, which uses real Blogger posts. But for some Blogspot blogs that may not be the best solution, so lets see how we can do the sticky post thing using a HTML/Javascript gadget. I did not find "full solutions" where the sticky post works like it should, i.e. displays only on the first page of the blog, but not on other pages. So here is one, by me.



Adding the gadget

Go to Design, Page elements. Click Add a Gadget (any link will do, we will move the gadget to proper place afterwards).


Write the text/html you want in your "sticky post", click Save. I suggest to not use any title, it helps the correct alignment when gadget is hidden.


Now drag the new gadget to top of blog posts, like this:


Save.

Hide the gadget on other pages than first

Open template html for editing. Before </head> add this:

<b:if cond='data:blog.url != data:blog.homepageUrl'>
<style type='text/css'>
div.main div.widget.HTML .widget-content { display:none; }
div.main div.widget.HTML { margin-bottom:-30px; visibility: hidden;}
</style>
</b:if>

Depending on your template you might have to change the value -30px to adjust the position of blog texts. -30px works for "Simple" template.

How to mimic a post in gadget html

Here's a "template" you can use in HTML/Javascript gadget contents to make the gadget have post-like title, spacing and body text.

    <h3 class="post-title">Sticky post (gadget)</h3>
    <div class="post-header"> </div>
    <div class="post-body">
    Some text.<br />
    <br />
    Some more.
    </div>

This template works at least in "Simple" and "Awesome Inc." templates, probably in others, too. :)

TERIMA KASIH ATAS KUNJUNGAN SAUDARA
Judul: How to make Blogger sticky post using a gadget
Ditulis oleh muamar
Rating Blog 5 dari 5
Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke https://androidmobile7.blogspot.com/2013/06/how-to-make-blogger-sticky-post-using.html. Terima kasih sudah singgah membaca artikel ini.

0 comments:

Post a Comment

Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android mobile.