Remove Navigation Links For Static Pages in Blogger

Blogger Logo

I recently received a comment on one of my posts that explain how to create static pages in Blogger regarding removing the navigation links. These links are usually located at the bottom of a post and allow a visitor to navigate to the next or previous posts of the current post.

I decided to look into how to do this as it doesn’t seem that difficult to do. After some testing I managed to hide those navigational links from static pages in Blogger. Let’s look at how to do this.

A Static Page in Blogger

Blogger Logo

Blogger doesn’t natively support static pages as WordPress does. Static pages are useful for such things as a privacy policy, a contact page, or an “about us” page. While you can’t officially create static pages, you can use posts as static pages.

I have written two posts that outline two different methods of creating static pages. I won’t go into detail on how to do this here, but feel free to read the posts to find out how. Basically it does involve hiding specific post elements to make it look like a static page.

One thing I didn’t do was show how to hide the next/previous navigation links. That is what this post will do.

Hiding the Next/Previous Navigation Links

Hiding the navigation links is really easy to do, and just involves allowing a line of code to execute for regular post pages only. To hide the links, you can use the following steps:

  1. Follow the steps outlined in Creating Static Pages in Blogger – Part 2. You will need the dates of your static pages for the next few steps.
  2. Open up your Blogger dashboard, and then click the “Layout” link for the blog you want to edit.
  3. Next, click the “Edit HTML” link to display the HTML for your template.
  4. Check the “Expand Widget Templates” checkbox to expand all the widget code.
  5. Using your web browser’s find option, search for:

    <b:include name='nextprev'/>

  6. Replace the line found above with the following lines of code:

    <b:if cond='data:blog.pageType == "item"'>
      <b:loop values='data:posts' var='post'>
        <b:if cond='data:post.dateHeader != "June 23, 2006"'>
          <!&#45&#45 navigation &#45&#45>
          <b:include name='nextprev'/>
        </b:if>
      </b:loop>
    <b:else/>
      <!&#45&#45 navigation &#45&#45>
      <b:include name='nextprev'/>
    </b:if>

    Note:

    Replace the date in the above with the date and format you use for your static pages.

    What the above code does is simply use the post date to determine if the navigation links are to be displayed. If the date doesn’t match the static page date, then display the navigation links, otherwise, don’t display the links.

Follow Me