Via E-mail:

Making technology easier to understand.

Hiding Static Pages from Main Page in Blogger

You are currently browsing comments. If you would like to return to the full story, you can read the full entry here: “Hiding Static Pages from Main Page in Blogger”.

65 people had something to say about “Hiding Static Pages from Main Page in Blogger”:

Comments

  1. Jennifer -

    Thank you so much for taking the time to post these extremely helpful tips! I think you do an excellent job of explaining the process and make it easy to understand. I am having an issue with this code however. When I put the code in my blog still publishes the pages and also adds back in the post date which I removed in an earlier step. Any idea what I am doing wrong? Thanks again for your help!

    • Jennifer -

      Okay I figured out my initial problem (I forgot to put in the day of the week!) but now I have another problem. All of my new posts show the date twice in the posting. This did not happen before I added this code. Any suggestions?

      • Paul -

        It depends on your code. You may have post.dateheader called twice which will dispay the date twice, or you may have forgotten to close an if statement.

  2. Michelle -

    Thank you so much for helping us that are less than technologically savvy. I’ve been trying to hide my static page using your method to no avail. The majority of text that you state that I should replace is not anywhere in my template all in one place. Just bits and pieces of the text scattered in different sections. Can you help me?

  3. Sarah -

    Please check my blog …..I would like to be able to click on one of the menu tabs (Memories, Recipes, etc.) and post directly to that page.

    What coding do I need? And, where do I put it?

    Thanks much for your help!!

  4. anshul -

    hello paul.. i have following issues with my blog:
    1) i used this hack on my blog but when I click on “Older Post” then my static pages are also shown as posts.

    2)Also when I click on “Older Posts” then the posts starts appearing with comment box below each post.

    3) I am not able to add page navigation in my blog.

    Please have a look at my blog to see the problem, You are my only hope, please help me with these issues..

    • Paul -

      Can you send me your template, using the contact form in the top navbar, and I’ll fix it up for you.

      • anshul -

        hi paul,
        i have sent u my template.. thanks :)

        • anshul -

          hello paul,
          thanks a lot for changing my template to my requirement. :) you are gem of a person always ready to help others out. Heartfelt thanks for that.
          i had an issue. i wanted to display post titles only on archive and labels page, but from 2nd page onwards it displays only titles and not textx. i want “titles+text” in all pages and “only titles” in labels and archive pages. can you show me a way around please ?? sorry for troubling you again and again.

          • Paul -

            That may not be possible because of how Blogger labels the pages. For the labels, archive, and home pages, the page type is “index”. This means that when you specify pageType == “index” in your code, it applies to all three types of pages.

            I’m not sure if there is an easy way of distinguishing one from another, but I’ll see what I can find. In the meantime, you may want to display the title in content on the pages to avoid any issues.

  5. T. Larking -

    Hi there – I am a new blogger trying to cobble together my blog, and hoping someone can help! I used the backdating method (and forward dating for the home page) to make static pages linked to a navigation link bar under my header.

    However, I am baffled as to how to make the “journal” link I made connect to regular blog posts I upload. I made a normal blog post and noticed it exists in the edit posts list, but I don’t know how to get it to load on the ‘journal’ page.

    I am probably just doing something really stupid….but can’t see it.

    Please have a quick look and help if you can?

    • Paul -

      I don’t think that is possible within Blogger’s code, probably Javascript can do it, though, but I haven’t looked at that option. The reason for that is how Blogger displays posts. When you display your homepage, Blogger allows you to loop through several posts to display on that page within the blog gadget. The number of posts depends on the settings in your blog.

      When a post is displayed, only that post can be displayed by the blog gadget, which is why you can show multiple posts within a single post.

      • T. Larking -

        Hmm, so just to clarify – if you make your ‘home page’ into a static page, there really is no way to have any of the links then connect to a page that functions as a ‘normal’ blog….?

        I saw somewhere, where someone was actually able to make a “posts” link in their navbar – but haven’t been able to find out how. Though I will try and find a workaround by tweaking the settings.

        Also, I didn’t realize were were able to add javascript to blog template code… I’ll look into that too.

        Thanks very much in any case. :)

        • Paul -

          After I left my last comment I thought about it for a moment. Technically there is a way to display your recent posts on a post page. It involves something like the following:

          1. Create a post to display the a list of your recent posts, as you have already done with your “Journal” post. Don’t include any content, only the title.

          2. Next add a “Feed” gadget to your template, right below the blog post gadget. For the feed URL, use your blog’s RSS feed.

          3. Next edit your template’s HTML, and surround the code in the Feed gadget with something like the following:
          <b:if cond='data:blog.url != "http://www.faeriesunrise.com/2009/12/journal.html"'>

          This will cause the code in the feed gadget to only display on your journal page. If you have some difficulties, just let me know, and I’ll create a post on how to do this.

          • T. Larking -

            I’ve been working on the blog all day today – and after pondering about 4 workarounds, I actually did this:

            Created a separate blog (with related title), changed the main-wrapper area so that it’s blank and can function as a template for a, gallery page, etc – without showing any sidebars (wouldnt want those pages to look like a blog).

            Then, dumped the ‘home’ link in favor of making the “home” page BE the blog, and tie links together.

            If I knew more about blogging I might be able to anticipate problems with this setup but for what I need for now it suffices.

            The idea you posted is a good one – if I hadn’t already put so much work into it today I might have tried that!

            In any case – I’m glad I came across your site, you’re very helpful to everyone and its very appreciated. I know my site has nothing to do with computers but I may post a link in one of my posts to your site as a thanks, if it’s ok.

            Cheers for now, tytyty!

  6. Sarah -

    Thank you for your excellent instructions and explanation! I made all the changes and worked through the error messages – however, I am unable to find the issue with the message below. Body has been followed by . Please assist.

    Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
    XML error message: The element type “body” must be terminated by the matching end-tag “”.

  7. Sarah -

    Sorry – element type “body” has been followed by

  8. Michelle -

    I left a comment before, but it didn’t get responded to.

    Thank you so much for helping us that are less than technologically savvy. I’ve been trying to hide my static page using your method to no avail. The majority of text that you state that I should replace is not anywhere in my template all in one place. Just bits and pieces of the text scattered in different sections. I’m able to hide the static pages a little because they’re not on the main page, but I’m trying to hide them completely. Meaning, if someone clicks on “older posts”, they won’t see the static pages. Can you help me?

    • Paul -

      I haven’t played around with preventing the static pages from appear if some clicks the older posts link. I may be able to do it from a post page, but from an index page, it may not be doable.

      I’ll play around with it and see what I can do.

    • T. Larking -

      Michelle – while I was searching around for info on static pages myself, I came across a post that says you can set the date forward in time (say, 10 years) in order to trick the blog and keep it from archiving.

      Don’t know if that’s what you needed, but hope maybe it helps? Otherwise I’d just keep trying the google search. Good luck…

      • Michelle -

        T. Larking – thanks for trying to help. Unfortunately, that’s not what I’m looking for. What I’m looking for is that my static pages not being seen anywhere on the blog except for the specific link that leads to it. Basically, my static page is a FAQ page. Although, I have it set so it doesn’t show on the archive list, if you click on “older posts” you’ll eventually see it. If I use your suggestion, the post remains on the main page because the date is set in the future, although I can hide the datestamp.

  9. Sarah -

    Thank you for your excellent instructions and explanation! I made all the changes and worked through the error messages – however, I am unable to find the issue with the message below. Body has been closed with html . Please assist.

    Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
    XML error message: The element type “body” must be terminated by the matching end-tag “”.

    • Paul -

      This issue usually occurs when you have an open tag but haven’t closed it properly. Check all your tags to ensure they are all closed. Also, you may also want to ensure that your quotes are proper and then they aren’t odd looking.

      The best way of looking for the problem tags is to find an XML editor online and install it on your local machine. The editor within Blogger is not easy to use when it comes to finding errors in your template.

  10. Sarah -

    Thank you!! Thank you!! The suggestion to download an XML Editor was the best yet. I now have one final error that the Editor does not seem to find …and I still cannot save the template. See error in next paragraph:

    The processing instruction target matching “[xX][mM][lL]” is not allowed.

    I’m unable to locate anything like this in my template. Any suggestions as to where I might look or how to resolve?

    Again, thanks for the tip on the editor.

Trackbacks/PingBacks

    Do you have something to say? Let everyone know!




    CommentLuv Enabled