Title: Code affecting comments
Last modified: December 8, 2020

---

# Code affecting comments

 *  Resolved [Karis](https://wordpress.org/support/users/askel45/)
 * (@askel45)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-affecting-comments/)
 * Hi. I stumbled [upon this cod](https://www.wpbeginner.com/wp-tutorials/speed-up-your-wordpress-by-caching-custom-queries-using-transients-api/)
   e, but it seems to affect the comments by changing the post’s comment or comment
   box to the last post appearing in the sequence (let’s say I am reading post A.
   The code is set to show six posts. Then the comments box for post A is the one
   for the last of the six posts). This however does not happen if I hook it after
   the comments box (like after main content). Same thing happening with default
   2020 theme. Are you able to kindly suggest a way to stop this from happneing?

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

 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-affecting-comments/#post-13757654)
 * Hi there,
 * Unfortunately we can only help with theme (GP) related questions in the free 
   support forum here.
 * For your question, I would recommend trying the following route:
    – Open a support
   topic with the WordPress support team. – Comment on the page you found and see
   if they can help with a solution. – Use a WordPress general forum like this: 
   [https://wordpress.stackexchange.com/](https://wordpress.stackexchange.com/)
 * Thanks for your understanding 🙂
 *  Thread Starter [Karis](https://wordpress.org/support/users/askel45/)
 * (@askel45)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-affecting-comments/#post-13776483)
 * Solved it. Just needed to add one line of code.
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/code-affecting-comments/#post-13777895)
 * Glad to hear 🙂

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

The topic ‘Code affecting comments’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Leo](https://wordpress.org/support/users/leohsiang/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/code-affecting-comments/#post-13777895)
 * Status: resolved