Pagination Issues, posts not showing up
-
Maybe this will help someone else who is having problems with forum pagination not working right and/or replies that don’t seem to show up…
A client was reporting that some forum replies were taking hours to a day or more to appear in some topics on the website. I was able to confirm this by mirroring the site to my localhost; I could see the replies in the administrative section but they weren’t showing up on the front end of the site, and would only show up if I posted a bunch of additional replies to trigger a new page. It only happened on topics that reached the point of needing additional pages, and whatever value I set for replies-per-page in the settings had no effect. After debugging the BBPress query object, I noticed that the “posts_per_page” values were different from the settings I had configured for BBPress.
I did a site-wide file search for the string “posts_per_page” and saw that the theme (Salient from Themeforest) had a function in functions.php that had added a filter for “pre_get_posts” and was hardcoding the “posts_per_page” variable to 12, which is the value I saw when dumping the BBPress query object. Once I set the BBPress replies-per-page setting to that value (12), pagination seemed to work and posts were showing up.
Anyway… maybe this will help someone else with the same issue with their debugging.
- You must be logged in to reply to this topic.