Remove comment box on pages

Is there an easy way to remove entirely any reference to comments on all Pages?

  • marikamitsos
    • The Crimson Coder

    Hello jjsararas and welcome to the WPMUDEV Forums,

    Can you please elaborate on the subject? Where exactly do you see the result of the reference? Your Page edit screen or the front of your theme?

    Could this solution be the right one for you?

    Please let us know if you need further assistance. We are here to help. :slight_smile:

    Thank you for your time,

    marikamitsos.

    Should you find the provided solution satisfactory, please mark the topic as resolved.

    Thanks again, marikamitsos

  • aecnu
    • WP Unicorn

    Greetings jjsararas,

    Certainly there are a couple of ways and of course one is by removing the hard code which is theme dependent.

    However, a less intrusive and permanent way would be to make sure comments are disabled Disable Comments plugin and then if you gets the “comments are closed” on your site use the Remove “Comments are closed” plugin to remove the “comments are closed” statement from your site.

    That could definitely do the job for you.

    Please let me know how it goes if you try it out.

    Cheers, Joe :slight_smile:

  • jjsararas
    • Site Builder, Child of Zeus

    Great, thanks, yeah there seems to be a hundred ways to do this.

    @marikamitsos – thanks for that link to the css snippet

    @joe – i didn’t know about those plugins, i’ll definitely tinker with those!

    With regards to hacking up page.php – would that get overwritten by any theme updates? Or do I simply copy the page.php file to the bp-corporate/themes/bp-corporate-child folder? I’m a bit of a newb with parent/child themes

    Thanks!

  • marikamitsos
    • The Crimson Coder

    “yeah there seems to be a hundred ways to do this.”. True :slight_smile:

    With regards to hacking up page.php – would that get overwritten by any theme updates? Or do I simply copy the page.php file to the bp-corporate/themes/bp-corporate-child folder? I’m a bit of a newb with parent/child themes

    You do NOT hack the page.php. You add that piece to your style.css

    And yes it WILL be over written once you update your theme. You are better of using a child theme. Can you please tell us which theme you use and if it supports child themes?

  • aecnu
    • WP Unicorn

    Greetings jjsararas,

    With regards to hacking up page.php – would that get overwritten by any theme updates?

    Yes it would possibly get overwritten with an update, but this can be overcome by simply permissioning the file 444 read only and FTPing the update because FTP will not touch a 444 permissioned file.

    Note: you may want to compare the files after update to avoid missing updates done to that particular file if any.

    Or do I simply copy the page.php file to the bp-corporate/themes/bp-corporate-child folder?

    You could do that as a safety precaution because the child theme folder will not be touched during an update, however, it will not be used there – the original in the parent folder will still be addressed and used for rendering the theme.

    Cheers, Joe

  • aecnu
    • WP Unicorn

    Greetings marikamitsos,

    You have a heck of a point – I am happy that we do not do it too often but we do come up with some killer solutions between the two of us.

    Happy to have you aboard here at WPMU Dev, and the same to you jjsararas if your listening.

    Thank you both for being WPMU Dev Members!

    Cheers, Joe

  • jjsararas
    • Site Builder, Child of Zeus

    You do NOT hack the page.php. You add that piece to your style.css

    And yes it WILL be over written once you update your theme. You are better of using a child theme. Can you please tell us which theme you use and if it supports child themes?

    Thanks Marika, I’m using the bp-corporate theme. I’m assuming it does use child themes because of the bp-corporate-child subfolder i mentioned above, but as I mentioned I’m a newb to parent/child themes and don’t really understand how to do this. Should I create a custom-style.css in that folder? Do you have any tutorial links to help me get a base understanding? (You seem to be the link-sharing master)

    And Joe, you bet I’m listening. Having too much valuable info thrown at me all at once is what I consider a good problem. :slight_smile:. Thanks all.

  • marikamitsos
    • The Crimson Coder

    I’m assuming it does use child themes

    Yes it does.

    From your cP go to your file manager and from there to your themes folder.

    Inside wp-content/themes/bp-corporate folder you’ll see another directory entitled themes with a bp-corporate-child folder. Move this folder to the same wp-content/themes directory

    BEFORE: wp-content/bp-corporate/themes//themes/bp-corporate-child

    AFTER: wp-content/themes/bp-corporate-child

    After doing that please have a look at the readme.txt file inside the /bp-corporate-child/_inc/css folder.

    PS. If you do not have access to your cp please go through the above steps on your computer and then use an ftp manager to achieve the above structure in your themes directory.

    And some homework. :slight_smile:

    The following links will help you understand a lot about child themes. Please have a read.

    https://premium.wpmudev.org/wpmu-manual/using-a-text-editor-for-minor-theme-edits/

    https://premium.wpmudev.org/wpmu-and-buddypress-themes/

    https://premium.wpmudev.org/wpmu-and-buddypress-themes/what-are-parent-and-child-themes/

    http://codex.wordpress.org/Child_Themes

    I hope that helps. Please let us know if you need further assistance. We are here to help. :slight_smile:

    If you’re in need of more help on the subject, please don’t hesitate to open a new post (since the title of this one could be misleading ).

    Thank you for your time,

    marikamitsos.

  • jjsararas
    • Site Builder, Child of Zeus

    Okay I opened a new thread to segue into ?’s re: parent/child theme below.

    But regarding what Joe says above:

    You could do that as a safety precaution because the child theme folder will not be touched during an update, however, it will not be used there – the original in the parent folder will still be addressed and used for rendering the theme.

    I’m confused as it seems to contradict this line in the homework link:

    Any files that are uploaded to the child theme automatically override those in the parent theme as the child theme loads before the parent. This technique can be used for any files and folders within the parent theme — but you must re-create the same folder and filenames structure in your child theme that exist in the parent theme folder.

    Is it only CSS files in the child that override, and not PHP? Anyway let’s pick it up here: https://premium.wpmudev.org/forums/topic/help-with-parentchild-themes?replies=1#post-197636

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.