Update Comment Count From Two Sources
-
I have facebook comments and WordPress comments enabled on my site. I also have a little comment counter for each post next to the title. I want the comment counter to display the total comments from both facebook comments and wordpress comments.
When a facebook comment is made I count both the wordpress comments and facebook comments and update the comment count under the post in the DB with a custom function outside of wordpress. That works great…
My problem is that when a new wordpress comment is made, it calls wp_update_comment_count which only counts the comments from wordpress.
I could, but do not want to, edit a core file. I could change the wp_update_comment_count function to count all the comments like I do after a facebook comment is made, but I don’t like editing core files.
Is there a filter or hook I could use after the wordpress counting that I could use to call my own counting function and update the DB with the total comments? Or is there a way to override that function through my theme?
thanks in advance!
- The topic ‘Update Comment Count From Two Sources’ is closed to new replies.