• Resolved sustainable

    (@sustainable)


    I found this great tutorial about how to create a static front page, and I also learned that it is possible to create additional static pages by making the front page their parent (in the page attributes on the right pane).

    But now I want all pages in my website to be static as well, but for some reason there is one page that keeps having the blog section, even when I make its parent the static front page.

    Is there a way to hideg the “Leave a Reply” box at the bottom of the page for all pages, including that last one?

    If so, how?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello sustainable,

    Depending on your theme, the page.php, loop-page.php, sidebar.php or footer.php will have the function ‘comments_template’ within it.

    http://codex.wordpress.org/Function_Reference/comments_template

    Comment out the line: <?php //comments_template(); ?> and this should shut off the Leave a Reply box for you.

    tribalNerd is right – you just need to remove comments from your templates. You won’t find the comments template in footer.php though. Simply remove it from page.php (for pages), single.php (for blog posts) and any other custom page templates (e.g. archives.php, sitemap.php etc).

    Thread Starter sustainable

    (@sustainable)

    This is weird: I managed to create all pages static (i.e. no “Leave a Reply” box at the bottom of the page) without modifying any .php code and without making the static front page their parent.

    And one I delete the only page that had that “Leave a Reply” box (the sample page automatically created by WordPress upon install), I got all my pages static.

    What made me think that making the (static) front page their parent is a requirement?

    I still don’t what made WordPress behave exactly like I needed. I did uncheck Settings > Discussion > “Allow people to post comments on new articles” prior to creating the new pages. Could that be the reason?

    Yes you need to uncheck the discussion option though removing the code from the templates ensures that you don’t have to go through old articles and disable comments.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to make ALL pages static?’ is closed to new replies.