Page Navigation Hack for Blogger (Blogspot)

ADVERTISEMENTS

Most of the people think that page navigation hack is only for who blogs at Wordpress. But here is the hack for those who use blogger and want to add page navigation to their blog. This hack will show page number instead of text link older posts, as shown in following screenshot.

You can see live demo here.

Now this involves two things - adding some CSS code and javascript code to your template. All steps are explained below.

Steps:

  • Log in to your blogger account and navigate to Layout section. Now go to the Edit HTML tab.
  • Search for line ]]></b:skin>
  • Add CSS in this file above that line.
  • Now search for this code or related in your template (no need to expand widgets)
<b:section class='main' id='main' showaddelement='yes'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/></b:section>

Mods:

In javascript codes in this file, find line…

var pageCount =5;

The digit in red represents number of posts to be shown in single page. Change the digit to show as many pages you want.

var displayPageNum = 3;

Here the digit in red represents number of pages to be listed. Change the digit to list as many pages you want.

That’s it now we have added Page Navigation menu hack to our blog successfully

Your Comments are appreciated..  :-)

(Credits: Muhammed from RTW)

Related: 6 Wordpress Plugins for Better Navigation and User Experience


[Editor Note: This is first post by Arjun Kumar on this blog. Arjun is just 16 year old and that make him youngest Devil in team DW. He is working hard on our new project OrkutBuddy, dedicated for orkut users.

If you like to write for Devils Workshop, please check this. Details about our revenue sharing programs are here.]

Share and Enjoy:
  • Digg
  • del.icio.us
  • IndianPad
  • StumbleUpon
  • Technorati
  • YahooMyWeb
  • Furl
  • Reddit
  • Google
  • TwitThis
  • Facebook
  • Slashdot
  • SphereIt
  • blogmarks
  • MisterWong

Comment RSS · TrackBack URI

22 Comments (including Pingbacks/Trackbacks) so far »

  1. #
    Maxpayne on October 14, 2008

    Hey really good hack thanks for the hack

  2. #
    Deepak on October 14, 2008

    @ Arjun:

    Dude please change the colors of the Ads as recommended by our Devil…

    Those colors really look very bad on this theme :(

  3. #
    dev on October 14, 2008

    Amazing!
    It worked like a charm!
    DW should have more posts like these. Crisp, precise to the point & very easy to use!
    And Arjun, Great Post! We look forward to more posts like this.

  4. #
    Abhishek on October 15, 2008

    Not working for me :(

    What may have went wrong?

  5. #
    Rohit on October 15, 2008

    it dint work for me friend….it does not show any parsing errors in the xml template but still….it does not work…donno why?…

  6. #
    arjunskumar47 on October 15, 2008

    @Maxpayne - Thanks..

  7. #
    arjunskumar47 on October 15, 2008

    @ Abhishek and @ Rohit

    Some reason may be that the var pagecount=5; and the number of posts in main page of the blog which is to be edited in formatting tab in setting may be not the same..

    just check that and reply back..

  8. #
    arjunskumar47 on October 15, 2008

    @Deepak -

    Changed the code..

    :)

  9. #
    Ciprian on October 16, 2008

    Incredible, dear friend. Excellent hack. It works just fine. Thank you.

  10. #
    Deepak on October 16, 2008

    @arjunskumar47 -
    Now it looks great :-)

  11. #
    arjunskumar47 on October 16, 2008

    @Ciprian -
    Thanks..

  12. #
    Souras on November 3, 2008

    This is working fine. But not showing all the posts of labels. I m using this is Blogger. Is there any way to solve this problem.

  13. #
    Arjun on November 3, 2008

    @Souras - It will show. It should show.

  14. #
    Gilles on November 6, 2008

    Hello
    http://atablechezclaire.blogspot.com => 6 posts, 5 on the 1st page, you can’t see the posts on 2nd page : no post listed.
    Any dea why ?
    Thank you :)

  15. #
    Ryvius on November 9, 2008

    Tried this hack, and a similar one on blogger buster, and both make some posts vanish at the beginning of each new page…
    Is there a bug somewhere?

  16. #
    arof on November 22, 2008

    thanks for the hack

  17. #
    Deepak Jain on November 22, 2008

    @arof -
    Welcome :-)

  18. #
    Rahul Bansal on November 25, 2008

    @Gilles -
    First sorry for late reply buddy as I was away on a long vacation… :-( I checked your blog but could not get what you are talking about exactly.
    Please let us know if you are still having problem. Also try to give more details.

  19. #
    j0e on November 29, 2008

    This isnt working for me. Nothing appears. the blog post widget in page elements is set to show 5 blogs in a page. Any ideas??

  20. #
    Arjun S Kumar on November 30, 2008

    @j0e -

    Did u install the script in correct place.?

  21. #
    j0e on December 1, 2008

    yes i did.. Just confirming.. Am i supposed to paste the 2nd javascript codes BEFORE or AFTER /b:section??? I did both..

Leave a Comment

 Name (Required)
 E-mail (Required)
 Website

Comment:

  OR Use forum if posting unrelated to this topic.
[Note: All comments will be moderated as per our comments policy.]

Subscribe without commenting


1 Trackbacks/Pingbacks

  1. 5 Best Blogspot Blogger Hacks Everyone Should Use! on December 1st, 2008