Fix – Comments not showing in Thesis theme after WordPress 4.0 Upgrade

A month ago, WordPress Version 4.0 “Benny” was released for the public with several enhancements and bug fixes. Though the new WP release went smooth but the new update caused few problems for WordPress users running the older version of Thesis theme. The issue is happening with Thesis 1.8.5 and older versions of Thesis earlier than v1.8.5, that aren’t compatible with WordPress 4.0. As a result of this, Thesis 1.x users might notice 500 Server Error and “Comments not appearing in posts” after upgrading to WordPress 4.0.

A similar issue occurred on our site, where readers were able to make comments but the comments weren’t actually showing up in any posts and one could only see the number of comments counter. Well, we fixed this finally and it was pretty easy! I’m sharing this as it could be useful for other Thesis theme users who’re facing the same issue since a month.

16-09-2014 12-51-10

DIYthemes has released a patch to fix this problem by releasing Thesis 1.8.6 update with full WordPress 4.0 compatibility. However, you need to have a DIY Themes account in order to download the update and see the instructions to update from version 1.x to 1.8.6. Well, you can even fix the highlighted issue simply by following the simple instruction stated below. The fix instructions reported here are derived from Thesis support forum.

Note: We have tried it on Thesis 1.8.4 + WordPress 4.0. If you’ve an older Thesis version prior to v1.8.5 then you must first update Thesis to v1.8.5. Somehow, if you can’t update Thesis, then make sure to take a backup of comments.php file first and then try the below trick.

NOTE: You must be using version 1.8.5 before deploying this fix; if you’re still using an outdated 1.x version, then you must update Thesis first.

1. Using FTP, navigate to the /wp-content/themes/thesis_185/lib/classes/ folder on your server.

2. Edit the comments.php file in the classes folder at line 187, instead of

$wp_query->comments_by_type = &separate_comments($wp_query->comments);
$_comments = $wp_query->comments_by_type['comment'];

you now write

$wp_query->comments_by_type = separate_comments($wp_query->comments);
$_comments = &$wp_query->comments_by_type['comment'];

The only change is moving the "&" to the $_comments-variable really but that seems to cause the 500 internal server errors.

Once you’ve followed these steps, check to see if your comments are now being displayed correctly.

Fortunately, the above quoted trick worked like a charm for us and comments started appearing again just like before. Let us know if it works for you. :) 

Tip via @leanderbraunschweig [WordPress Support]

Mayur

Mayur Agarwal is the founder and editor-in-chief of WebTrickz. As a Technology enthusiast and an Internet addict, he loves sharing useful How To’s and Tips & Tricks. Follow him @mayurjango on Twitter where he is extremely active.

10 Responses

  1. I’m having the same issue with missing comments on my homesAtMueller site and I tried your fix to no avail 🙁

  2. Usman Ali says:

    Works Like a Charm. Thanks for the great tip. Because it was a big headache for me, as the comments were not appearing. 🙂 Thanks A Lot. 🙂

  3. Giri says:

    I am using thesis 1.8.4. but the suggested fix worked for me. Thanks a lot

  4. maria says:

    Thank you so much – this worked for me!!!

  5. Ruth says:

    Wow! Thank you. I\’m SO grateful. Fabulous step by step instructions.

  6. Janette says:

    It worked…thank you. I am using Thesis 1.8.1 and had trouble finding the file to replace the code but found it for my older version in wp-content/themes/thesis/lib/classes/comments.php.
    Thanks so much!

  7. Scott says:

    Thanks very much for documenting this fix. One of our web hosting customers was having this exact problem, and your fix was super easy to implement.

  8. techsparks says:

    Every one is scared when it is the time to submit your thesis but if you find a right guide who can guide you through right path than it becomes an easy job to accomplish . We promise to provide you best level thesis help for your thesis work.For more imformation visit our site : http://www.techsparks.co.in

  9. Michael says:

    This change did make the comments visible to visitors, however when trying to log into our site as administrator I was greeted with a warning you can not modify this file. I should have copied the exact wording but I did not. Unable to log into the site, I have restored the comments.php file to its original code. I can again log into the site but have of course lost the comments. Anyone have this result? What did I miss?

  10. Marie N says:

    Mayur, you are nothing short of a life saver! I have been trying to fix this for a loooonggggg time, and was beginning to hit my head on a wall that I\’ll probably have to redo my blog.

    I am using 1.8.1 and it still work, yeaaaahhh!!!

    Thanks soooo verrryyyy much! You did not have to share, but you did, and we are grateful 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *