Friday, August 24, 2007

Removing The Newer Post - Home - Older Posts Links

One of the neatest things about Layouts templates (OK, I know that I say that a lot) is the expanded main page. Those of you who don't remember the Classic blogs, the short main page, and then the need to find the Archives links again, won't have the same feelings. OK, your loss. Those of you that still have a blog with a Classic template can stop reading here, as the Newer Post - Home - Older Posts Links require dynamic HTML, and Layouts templates.

The ability to view a whole main page, then follow that with another main page, and so on through the entire blog, is a great improvement. Not all Bloggers agree with this sentiment though. Some Bloggers care for it so little, that their frequent question is
How do I get rid of the "Newer Post" - "Home" - "Older Posts" links?

Fortunately, this is not a difficult task. Always start by backing up the template.

Using the Template Editor, hit "Jump to widget", and select "Blog1". Position the cursor within the editor window, hit "Ctrl - F", and find "nextprev".

(Note): What you see below has been liberally seeded with gratuitous line breaks, to prevent post / sidebar alignment problems.

<b:includable id='nextprev'>
<div class='blog-pager' id='blog-pager'>
<b:if cond='data:newerPageUrl'>
<span id='blog-pager-newer-link'>
<a class='blog-pager-newer-link' expr:href='data:newerPageUrl'
expr:id='data:widget.instanceId + "_blog-pager-newer-link"'
expr:title='data:newerPageTitle'>
<data:newerPageTitle/></a>
</span>
</b:if>

<b:if cond='data:olderPageUrl'>
<span id='blog-pager-older-link'>
<a class='blog-pager-older-link' expr:href='data:olderPageUrl'
expr:id='data:widget.instanceId + "_blog-pager-older-link"'
expr:title='data:olderPageTitle'>
<data:olderPageTitle/></a>
</span>
</b:if>

<b:if cond='data:blog.homepageUrl != data:blog.url'>
<a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a>
<b:else/>
<b:if cond='data:newerPageUrl'>
<a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a>
</b:if>
</b:if>

</div>
<div class='clear'/>
</b:includable>

Take a deep breath, and delete all of that, carefully. You do have a backup, so do it. Save the changes, and test.

When you're happy, backup the template, again.

>> Top

13 comments:

Paulus Romanus said...

In order for this to work I had to delete everything between the first and last line. If the first and last lines are deleted, nothing happens.

Chuck said...

Paulus,

I didn't delete any lines, simply added one line above the 3 existing lines. Which first and last lines are you talking about?

Paulus Romanus said...

the first line:
<b:includable id='nextprev'>
the last line:
</b:includable>

If I deleted them with the rest of the code, nothing happened. It was like I never edited the template. Everything that I've deleted reappeared.

Christian said...

It works!!!!!!

but like paulus said, you have to leave the first and the last line...

Rodyssey said...

This works. Many thanks!

Like paulus, I also had to leave the first and last lines in place.

Bass said...

Hi, I have deleted the "Older Posts" and "Newer Posts" links and now I NEED them back but have no backup :( Help please!

It's www.freakbeat.org

Chuck said...

Bass,

I think you'll get them back, if you reset the post template.

— Kim said...

I have the Aspire template for BlogSpot. The only problem is that, after I added a Blog Description, there are no longer any links at the bottom for "Older Posts" and "Newer Posts." Where did they go, and what do I need to do to get them back? (I should mention that I can see them whenever I do a text search on the page, i.e., CTRL-F; they suddenly show up on the page!) Please help me get them to show up all the time!

Thanks,
Kim
http://topdogblog1.blogspot.com

Chuck said...

Kim,

Try resetting the post template, to start. If that doesn't help, you may need to work with the creators of the Aspire third party template.

Burgard Iris Farm said...

OK maybe I'm not the sharpest tack in the room, but I'm not getting this.
I did what paula said, and the only thing that happened was the words "older Post" disapeared from my Main page.
I thought what ever we were doing here would restore my main page back to the way it was before google changed it? One main page, not the 3 I have now.
Chuck said, "I didn't delete any lines, simply added one line above the 3 existing lines."
If you didn't delete anything, what exactly did you add. I copied the whole thing from this page thinking you added something different to get back to having one main page, that didn't do anything either.
What am I missing?

Dejaviewer said...

Hey, i found very interesting and useful topics here, but i still have a question about - what if i want to change "newer posts old posts" to simply "next" or left and right arrows or simply number of pages that can be easy browsed instead of this annoying older posts, newer posts...
Thank you very much in advance. :)

Chuck said...

what if i want to change "newer posts old posts" to simply "next" or left and right arrows

I did this, and it's not a difficult project.

SoTypMe said...

It works! But only if you keep the first and last lines.