• Resolved peterdouglas

    (@peterdouglas)


    A while ago, when I started my website, I thought I just wanted to have it “magazine style” and publish articles while not allowing comments. But now I’m thinking that I’d like to allow people to comment on blog posts.

    Stupidly, I believe I actually removed code from the WordPress files. Out of frustration, I did that. Now I am older and wiser and know how to disallow comments through the checkbox under “screen options” as well as through the Thesis theme and skin I am using.

    It’s been so long that I really don’t remember which file I edited to remove the commenting – or if it was WordPress code or theme code. Seems to me I removed a fair bit of code, because I didn’t want it to say “0 Comments” or “Comments Closed” so I probably removed the code for that too. Since this website has now grown to get a fair amount of regular traffic I don’t want to experiment with activating other themes or playing around with the code and possibly breaking the site. Which file would I look at to see if I’ve hacked it? Maybe I could just copy an unedited version of that file from another one of my WordPress sites?

    The website in question is https://afterbankruptcycanada.ca/

    Thank you in advance for any tips and suggestions!

Viewing 8 replies - 16 through 23 (of 23 total)
  • It is different than my file. I would try it. Still using DW? Make the change and upload. If it doesn’t work hit undo and upload it again.

    If you can post your comments.php file here we can tell you exactly where to edit:

    https://wordpress.pastebin.com/

    Thread Starter peterdouglas

    (@peterdouglas)

    Sure, here’s my code for comments.php:

    https://pastebin.com/uEdjYEUZ

    Thanks. You can try what you mentioned before, but I think that’s just pulling data from existing comments and preparing them for display.

    Which comments.php file is that? There should be another file with more detailed info for comment input.

    It might be in

    classes/ * comments.php.

    This would also be a good post to put out there to the Thesis forums. Just ask them which file contains that form for posting new comments, then you’ll want to look for the input fields and edit the labels for them to include the text “Optional).

    Thread Starter peterdouglas

    (@peterdouglas)

    Good call – there was another comments.php file in Classes. I’ve put a link to it below. Since posting it, I’ve added some wording to indicate that the fields are optional and that all replies are moderated.

    https://pastebin.com/ZXxwkCyT

    I guess I’ll be fine until a new version of Thesis is released, as I had to hard code that file. I don’t think this can be accomplished with hooks unfortunately.

    Thread Starter peterdouglas

    (@peterdouglas)

    To save you from looking through all of that code, it starts at line 82.

    Right on. See the little snippet of code that says:
    <?php _e('Name', 'thesis')

    That needs to be changed to:
    <?php _e('Name (Optional)', 'thesis')

    Change that for each of the fields and upload the file and you should be good to go.

    As far as upgrading, yeah that’s the downside of having these types of themes. They allow you to do a lot yourself, but you are subject to losing custom code when upgrades are made because the theme isn’t meant for people capable of doing custom code.

    Let us know how it works out. If it does, don’t forget to mark the post as “Resolved”. If not, let us know and we’ll keep at it.

    Thread Starter peterdouglas

    (@peterdouglas)

    Yep, I got it! Thanks for all the help and suggestions. ??

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Long ago I edited the code to remove commenting, how can I put it back?’ is closed to new replies.