so the first thing would be to either use a test blog or download a backup copy of your template before doing this to your blog as i cannot be held responsible if you mess up your blog.
Once you are ready go to your blog and create a new post using whatever title you want for this tutorial i gave mine the title of "About" now add your post content when you have finished click the "Post Options" link found at the bottom of the post editor see screenshot below
Well here's how we can get rid of them on the static pages which we don't allow reader comments go to layout > edit HTML expand the widget templates and find the following code
<span class='post-comment-link'>
<b:if cond='data:blog.pageType != "item"'>
<b:if cond='data:post.allowComments'>
<a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><b:if cond='data:post.numComments == 1'>1 <data:top.commentLabel/><b:else/><data:post.numComments/> <data:top.commentLabelPlural/></b:if></a>
</b:if>
</b:if>
</span>
so we need to wrap the post date, time, posted by and whatever else you don't want showing within the tags so they are not shown on our pages which do not allow comments
here's an example of the timestamp, posted by, and email icon wrapped within the tags as described above
<b:includable id='post' var='post'>
<!-- Code removed for simplicity -->
<div class='post-header-line-1'/>
<div class='post-body entry-content'>
<data:post.body/>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
<div class='post-footer'>
<div class='post-footer-line post-footer-line-1'>
<b:if cond='data:post.allowComments'>
<span class='post-author vcard'>
<b:if cond='data:top.showAuthor'>
<data:top.authorLabel/>
<span class='fn'><data:post.author/></span>
</b:if>
</span> <span class='post-timestamp'>
<b:if cond='data:top.showTimestamp'>
<data:top.timestampLabel/>
<b:if cond='data:post.url'>
<a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'><abbr class='published' expr:title='data:post.timestampISO8601'><data:post.timestamp/></abbr></a>
</b:if>
</b:if>
</span> <span class='post-comment-link'>
<b:if cond='data:blog.pageType != "item"'>
<a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><b:if cond='data:post.numComments == 1'>1 <data:top.commentLabel/><b:else/><data:post.numComments/> <data:top.commentLabelPlural/></b:if></a>
</b:if>
</span> <span class='post-icons'>
<!-- email post links -->
<b:if cond='data:post.emailPostUrl'>
<span class='item-action'>
<a expr:href='data:post.emailPostUrl' expr:title='data:top.emailPostMsg'>
<img alt='' class='icon-action' height='13' src='http://www.blogger.com/img/icon18_email.gif' width='18'/>
</a>
</span>
</b:if>
<!-- quickedit pencil -->
<b:include data='post' name='postQuickEdit'/>
</span>
</b:if>
<!-- Code removed for simplicity -->
</b:includable>
and the post date
<b:includable id='main' var='top'>
<!-- posts -->
<div class='blog-posts hfeed'>
<b:include data='top' name='status-message'/>
<data:adStart/>
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.allowComments'>
<b:if cond='data:post.dateHeader'>
<h2 class='date-header'><data:post.dateHeader/></h2>
</b:if>
</b:if>
<b:include data='post' name='post'/>
<b:if cond='data:blog.pageType == "item"'>
<b:include data='post' name='comments'/>
</b:if>
<!-- code removed for simplicity -->
</b:includable>
<b:if cond='data:post.allowComments'>
(normal pages this post allows comments)
comment link, email post etc .. go here
<b:else/>
(static pages post's that do not allow comments)
anything you want to show on static pages goes here
</b:if>
i hope you enjoyed reading this tutorial if you are having any problems leave your comment and let me know i will get back to you as soon as i can
61 Responses to “How to create static pages on blogger”
Mariposa
May 12, 2009I've been wanting to do this...yet I can't seem to understand the codes here yet...LOL Let me read and re-read this one.
Thanks!
Anonymous
May 26, 2009you can not be a teacher! :D lol its a little confusing!
Lawny
May 27, 2009@Anonymous
whats confusing ?
Subodh Raghav
May 28, 2009Did not got it.
www.techieway.blogspot.com
Lawny
May 29, 2009@Sandeep
did not got what ? if you disable comments on a post and wrap the following code
<b:if cond='data:post.allowComments'>
content here will not be visible if the post doesn't allow comments
</b:if>
around things you don't want to show within that post they are not shown
che carina!
June 11, 2009thanks heaps for the tut..i've been looking for this for ages..can't wait to give it a go..
Jeff Branch
June 12, 2009What do you mean by "wrap the post date?" What does wrap mean?
Lawny
June 13, 2009@Jeff Branch
if you nest or wrap those tags around the post date then create a post and disable comments for that post the date will not be shown when you visit that post for example
<b:if cond='data:post.allowComments'>
<!-- only show the date if the post allows comments -->
<data:post.dateHeader/>
</b:if>
Mariposa
June 21, 2009I did it...and I did it successfully at first try and in my other sites as well!
Now...it's not really confusing as it seems at first look.
The first codes were just shown to us to understand how it works...then the in the following codes, the ones in red were the one we need to add to our code. The conditions there (codes in red) will function everytime we make a post and disable funtions in the foot of our post like author, tags, date, etc.
Thanks so much!!!
Lawny
June 22, 2009@Mariposa
yes thats right I'm glad you was able to follow my tutorial
Ezri Isa
June 30, 2009Hi Lawny,
Could you please show me how to make the author name,date & time post go next after the post title?
Example:
"How to create static pages on blogger" by Lawny on 23 June 2009 02:22am.
please help!
Lawny
July 01, 2009@Ezri
i might write a post showing how you can customise the post template when i get time however i cant promise you
Review Squad
July 04, 2009Impressive! You're rocks! It helps me to make my blogspot blog look more pro. Thanks for this.
Reanna73
July 11, 2009I dont get it i cant find some of the codes you said there would be therefore i am mortally CONFUSED. i just dont understand!
Reanna4eva.
Lawny
July 11, 2009@Reanna4eva
make sure you have expanded the widget templates otherwise you will not see the codes such as <data:post.dateHeader/>
DeJa Vu
July 21, 2009Oh wow! Thank you force this tutorial. I'm really looking to renovate my blogs and make them more functional.
Thanks again.
medical student
July 22, 2009great blog .. i'll try it now ,it looks very nice ...thanx
Anonymous
September 14, 2009This is the best static page article, the others on the internet didnt explain how to remove author.
Evangeline
October 02, 2009I have a different template that doesn't use the data:post.dateHeader/ tag. I've tried wrapping around any tags that look similar (i.s., have "date" in them), but nothing seems to get rid of the date. I have everything else worked out.
Any advice?
Lawny
October 03, 2009@Evangeline
where did you download the template from ? the designer may of removed the code
Evangeline
October 03, 2009Figured it out! My code used timestamp instead of dateHeader, since the date is on every post. Thanks for a great trick!
Lawny
October 03, 2009@Evangeline
I'm glad you was able to figure it out
Catherine
October 26, 2009Hi. I found this tutorial a little tricky to follow, as I was just guessing which bits of code I had to wrap, but I did manage to set up the page and delete most of the stuff I didn't want. I am still left with this stuff though, and I don't know how to get rid of it:
0 Response to "Email our teacher"
Newer Post Home
These bottom two are links. There wasn't a place in my Post Options to allow or not allow backlinks.
I am using a converted Wordpress template.
Hope you can help.
Lawny
October 26, 2009@Catherine
the template you are using will of been customised so you may need to search for the codes they will be in a different place
Unknown
December 01, 2009Lawny: Help, help, help .....please!!
My blog has a main page where only the welcome message is displayed. I have created tabs for "static pages" (Memories, Recipes, Photos, Tips, etc.) on the menu bar, but am unable to post to those pages. If you click on one of the tabs, the correct page is accessed but when I create a New Post - it goes to "cyber space". I can go to Edit Post and click view and see the post, but am unable to get it to the correct page.
My blog is msporch.blogspot.com. I would appreciate any advice that you have time to share.
Thanks much,
Sarah
Lawny
December 01, 2009@Sarah
it sounds like you have either put the tags in the wrong place or deleted them
Unknown
December 01, 2009I attached the tags, using HTML, as a gadget on the layout. They haven't been deleted - as stated earlier, I can access the page but am unable to get the post attached to the page.
Should the tags be elsewhere?
Sarah
Lawny
December 02, 2009@Sarah
I know the navigation links haven't been deleted when you click the navigation links on your blog only the post title is displayed on the page because you have either deleted the <data:post.body/> tag or put it in the wrong place so i recommend you read the tutorial more carefully also i can't really help you as i'm too busy working on other sites unless you want to hire me
Free Samples
December 13, 2009Awesome, thank you so much!
AviD
December 16, 2009Thnx Frnd for elaborating ,
I have created a multiple static page site on blogger have a look and give feedback :D
http://orevapowersaver.blogspot.com/
AviD
December 16, 2009Hi Lawny,
can we remove the following links to appear below every post???
--
1. Newer Post
2. Home
3. Older Post
???
Lawny
December 16, 2009@AviD
they already appear below every post if you want hide them use following CSS code
#blog-pager{display:none;}
Anonymous
December 24, 2009errrr, i can't get it right. Please help. Can you please email me at madame_k@ymail.com? I look forward to your response.
Lawny
December 27, 2009@Anonymous
sorry i don't have time
Kelly
January 03, 2010THANK YOU!! A little confusing to follow at first, took me several tries, but I did it!!
If you could answer this , I would be very grateful :) I deleted everything like you said, but the "reactions" still remain. Any idea where to find tehm in the HTML code and what I need to insert to get those reactions to go away?
My blog:
http://diaryofamadwomann.blogspot.com/
And the static page:
http://diaryofamadwomann.blogspot.com/2010/01/hey-welcome-to-my-blog-my-name-is-kelly.html
Nick Jackson
January 06, 2010Very good article. I think that if one reads the article and Mariposa's 2nd comment a couple times, it will make sense.
The big challenge for some will be knowing where to find the code on the the edit HTML page that they want to turn off by using the code you showed us in your article.
Lawny
January 06, 2010@k
i cannot see the "reactions" widget below your static page
Anonymous
January 08, 2010Your punctation is what is confusing everyone. Put periods "." at the end of your sentences, and break up your run-on sentences, like this one, with a comma ","
Also, using CAPITAL LETTERS at the beginning of a sentences denotes the beginning.
If you used these three things, this tutorial wouldn't have taken me 3 times to figure out, but thanks for the information anyways.........
Anonymous
January 08, 2010Why no punctuation?
Lawny
January 09, 2010@Angel
maybe i was in a rush the main thing is that you understand how the code works anyway i'm going to update this tutorial when i get time
Kevin
January 09, 2010i'm lost. i have static pages setup, and added a new theme, and i had the timestamps not show up anymore. once i went to the new theme, they came back, and i still cannot find out where to turn that feature off?
do you know which .css file i need to go into and delete to remove the timestamp from just pages?
thanks
Lawny
January 10, 2010@kevin
to remove the post timestamp from static pages make sure you have expanded the widget templates then look for the following code
<span class='post-timestamp'>
<b:if cond='data:top.showTimestamp'>
<data:top.timestampLabel/>
<b:if cond='data:post.url'>
<a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'><abbr class='published' expr:title='data:post.timestampISO8601'><data:post.timestamp/></abbr></a>
</b:if>
</b:if>
</span>
modify it until it looks like
<b:if cond='data:post.allowComments'>
<span class='post-timestamp'>
<b:if cond='data:top.showTimestamp'>
<data:top.timestampLabel/>
<b:if cond='data:post.url'>
<a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'><abbr class='published' expr:title='data:post.timestampISO8601'><data:post.timestamp/></abbr></a>
</b:if>
</b:if>
</span>
</b:if>
that way the timestamp will only appear on post's which allow comments
Nick Jackson
January 10, 2010How do you remove wigdets on the static page because they are not part of the b:include?
Nick Jackson
January 10, 2010How to remove widgets from a static page? They are not including in the b:if cond code?
Danny
January 10, 2010Great post. Thanks for explaining.
Was searching this for quite some time.
Marc
January 12, 2010Hey Lawny,
Is there somewhere to put the "allowComments" condition so that the blog-pager links (Newer Post, Older Post, Home) still remain on the normal posts but not on the "static pages"?
I notice you have been able to do this on this website on the Privacy Policy and Disclaimer pages.
I do not understand what you mean when you said to AviD to use the CSS code #blog-pager{display:none;}
Is this what you have used on this website?
Lawny
January 13, 2010@Nick
first you need to create a post then copy the url and add it to the if conditional tag for example
<b:if cond='data:blog.url != "http://BLOGURL.com/2009/10/test-post.html"'>
content here is shown on all pages apart from the
post page given in the conditional tag above
</b:if>
so you could wrap that code around widgets you don't want to show on the page given in the conditional tag
@Marc
Expand the widget templates and look for the following code
<b:include name='nextprev'/>
modify it until it looks like
<b:if cond='data:post.allowComments'>
<b:include name='nextprev'/>
</b:if>
Marc
January 14, 2010Okay, thanks Lawny.
I had previously tried this (what you recommend) before but it didn't work, and it still doesn't work. It affects all posts when I wrap "nextprev" with the "allowComments" condition. Don't know why.
So I tried using the URL as the condition instead (like you point out to Nick), and it worked.
Thanks.... you're a champion.
Nick Jackson
January 17, 2010Hi Lawny,
I took your advice and could not turn off my ad widget. Could you explain where to start and end with wrapping code around widget.
Thank you,
Nick
Anonymous
January 18, 2010Lawny,
I tried your suggestion and I was not successful. I do not think that I usnderstand how to wrap the code
and correctly.
I would appreciate it if you gave me a more specific example on where to place the code.
Thank you,
Nick
Phil
January 19, 2010Thanks for your tutorial.
I have been able to remove the comments and time stamp but I couldn't manage to remove the email icon from my static page.
I think I found the code for it but I am not sure where to place the tags.
I have tried several positions but I always get an error message.
Can you tell me how to do it properly?
Thanks
Lawny
January 20, 2010@Nick
it depends where you are using the code
@Phil
try the following code
<b:if cond='data:post.allowComments'>
<b:if cond='data:post.emailPostUrl'>
<span class='item-action'>
<a expr:href='data:post.emailPostUrl' expr:title='data:top.emailPostMsg'>
<img alt='' class='icon-action' height='13' src='http://www.blogger.com/img/icon18_email.gif' width='18'/>
</a>
</span>
</b:if>
</b:if>
Phil
January 20, 2010Bingo! Thank you Lawny!
Kai Lo
January 24, 2010Did I tell you how much I love you? I was about to make a privacy policy page, but it would show up in the homepage as new post. Thank God I found this post!
-Kai Lo
film izle
January 26, 2010hey thank you Lawny :)
Петко Физиев
February 07, 2010hi, the code is working. although i think it is not the best way to have static pages. it would be better if you set the date of these posts to something far in the past and make the if statement something like:
Now, you have to set the post date for all your static pages to something before 1 Jan 1981. In this way you could have static pages with comments and dynamic without comments. Which is better then you solution.
Unfortunately, I coudn't find a way to create
the date object to compare the post's date to (in this example - 1 Jan 1981). The blogger docs don't say much about the proper way to compare dates in condition statements. Do you know how to do it?
Also, another problem with these tricks is that our "static" pages appear in the archive widget. no big deal, but if you click on the month or day link in it, you will get an empty list, because blog.pageType is not 'item' in this case. an empty list is not exactly what one expects. to solve this you have to remove the static pages from archives! i'm working on it now. gonna post something soon. i'll be very glad if you could help me with the date thing though.
Петко Физиев
February 07, 2010Dude, I just found that all our efforts are absolute pointless!! There is an official way to create up to 10 static pages in blogger. Go to Posting -> Edit pages in the admin interface.. I can't believe I find it now after all the efforts to fix this :)) Cheers!
Lawny
February 08, 2010@Петко
my post mentions at the top that pages are available via blogger
Frank
February 14, 2010Everything was as you described until I tried to preview it and it came up with:
Your template could not be parsed as it is not well-formed. Please make sure that all XML elements are closed properly. XML error message: The element type "span" must be terminated by the matching end-tag"".
Lawny
February 14, 2010@Frank
It means that you have forgotton the closing </span> tag anyway why bother with this, pages are available via blogger go to posting > edit pages then you can create upto 10 pages
direk izle
February 23, 2010Thanks. Very Nice. Thanks You Admin For Sharing
Leave a Reply
Comments are moderated before appearing on site, comments that contain suspicious information, self-advertising or spam-like URLs will be deleted.
Note: only a member of this blog may post a comment.