Title: Comment Off
Last modified: August 19, 2016

---

# Comment Off

 *  [Root](https://wordpress.org/support/users/root/)
 * (@root)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/comment-off/)
 * Hi guys / girls and thanks in advance
    i would love to add a function to functions.
   php to eliminate all references to comments on pages of static content ie if 
   a page do nothing if a post do yr comment stuff there must be a function for 
   this somewhere already ? this is assuming of course that the functions.php in
   default child themes gets fixed soon ty

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/comment-off/#post-1809923)
 * I don’t see any benefit to adding something to functions.php for this kind of
   thing. Why not just omit the call to `<?php comments_template();?>
    ` in page
   templates?
 * > this is assuming of course that the functions.php in default child themes gets
   > fixed soon
 * Why? What’s wrong? I’ve not noticed any problems in child themes.
 *  Thread Starter [Root](https://wordpress.org/support/users/root/)
 * (@root)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/comment-off/#post-1809925)
 * omg
    how can u suggest hacking the default ? i want a pure child theme to protect
   my upgrade path and all the other goodness any fool can hack the core………..
 *  Anonymous User
 * (@anonymized-3085)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/comment-off/#post-1809933)
 * > Why not just omit the call to `<?php comments_template();?>` in page templates?
 * esmi was not suggesting you hack core, she was suggesting you change the templates
   for pages **within your theme** to omit calls to comments.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/comment-off/#post-1809936)
 * > how can u suggest hacking the default ?
 * Pardon? Hacking what default? page.php and functions.php can be found in **both**
   the parent and child theme. You use the custom files in the **child** theme. 
   That is the purpose of child themes, after all.
 *  Thread Starter [Root](https://wordpress.org/support/users/root/)
 * (@root)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/comment-off/#post-1810063)
 * well this is interesting. If we replace template files by copying them into our
   child theme then hacking errrrrr patching them……we lose the stand alone nature
   of childs………..its a short step from there to omit the step and hack the default
   i guess………i wish there was a model that allowed us to do this but there is such
   a plethora of templates now in default, most imho could be reamalgamated into
   index with appropriate conditionals………..then we only need add to functions php
   at the child theme level……..
 * in fact what u propose is worse that hacking the default because if u run a lot
   of sites yr upgrade path is really ugly……..the notion of child themes can only
   take root if the parent is sufficiently robust eg more action hooks;
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/comment-off/#post-1810068)
 * > .we lose the stand alone nature of childs
 * A child theme isn’t standalone by definition. It requires that the parent also
   be installed.
 * > its a short step from there to omit the step and hack the default i guess
 * I think you might be missing the point of child themes. If you make your customisations
   in a child, you can happily upgrade the parent without over-writing your custom
   templates/functions/CSS. so you can have all the benefits that a parent upgrade
   might bring in terms of extra functionality without having to re-customise from
   scratch again.
 * > in fact what u propose is worse that hacking the default because if u run a
   > lot of sites yr upgrade path is really ugly
 * I’m sorry but that’s simply not true. I can build a parent theme and install 
   it on 20 different sites – each with their own custom child theme. If I then 
   want to add extra functionality to every site (for example, add 3.1 post format
   support), I simply need to edit a single theme (the parent) and upgrade that 
   single theme each site instead of upgrading 20 different themes.
 * Having originally had about 14-15 free themes available for download on my sites,
   I can assure you that keeping them up up-to-date with the latest WordPress functionality
   was a **major** chore. So much so, that I’m gradually retiring them in favour
   of only a couple of child-aware parent themes and associated child themes as,
   and when, needed. It makes my life a lot easier and means that I can get parent
   upgrades out far more quickly with each WordPress release.
 * > the notion of child themes can only take root if the parent is sufficiently
   > robust eg more action hooks
 * I wouldn’t necessarily say that more action hooks are needed – although I’d dearly
   love to see a de-register hook similar to that available for plugins on deletion.
   I do think that parent themes need to be built with child themes in mind – otherwise
   building the child can become an exercise in frustration. Plenty of filters and
   nice modular functions seems the best approach, in my opinion. But you never 
   really know how well you’ve implemented this until people start building child
   themes. Which is one of the reasons that my latest theme has recently been released
   as a beta – so that people can try it out and feedback any issues.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Comment Off’ is closed to new replies.

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [pages](https://wordpress.org/support/topic-tag/pages/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 6 replies
 * 3 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/comment-off/#post-1810068)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
