Support Forum
I've recently added the linked blog post option to my site and am noticing one issue with the installation and am unsure of how to fix it.
Both comments left on the blog post and replies left within the forum will pass to their respective places - That is to say that a comment left on the blog shows up in the forum and vice versa. However, only comments left on the blog post add to the comment count of the post.
You can see this on my test post on my site here which has 4 comments two created on the post and 2 created using the forum. Wordpress only sees the two that were created using the comment box under the post while the other two are displayed but not counted as comments.
http://www.phogropathy.com/wha.....hy-anyway/
However the same post on the forum has all four comments and they are counted properly.
http://www.phogropathy.com/for.....hy-anyway/
So long story short, is there a way to display the comments as they are displayed within this post on my site, but have wordpress count the total of both WP comments and Forum comments in the comment count on the blog post?
have you replaced the wp comment count template tag with ours? that would be: spCommentsNumberTag()
WP recently just updated their comments count to add a new filter to it... so it will now be possible for us to adjust the count without using our template function... we just need to find the time to update our plugin to use the new wp filter... soon hopefully...
Visit Cruise Talk Central and Mr Papa's World
Mr Papa said
have you replaced the wp comment count template tag with ours? that would be: spCommentsNumberTag()WP recently just updated their comments count to add a new filter to it... so it will now be possible for us to adjust the count without using our template function... we just need to find the time to update our plugin to use the new wp filter... soon hopefully...
I'm not exactly sure how to change this, it might not be possible with the theme I'm using (headway 3.0). Or maybe I'm looking in the wrong place?
typically it would be in the comments.php file in your theme... do you have one of those? if its a recent theme, look for
get_comments_number()
we can help change it up...
Visit Cruise Talk Central and Mr Papa's World
Yeah, it seems that Headway doesn't have a comments.php file that I can access. Not really sure if there's a way I can do this using their theme so I might have to just wait for the update to the plugin.
I have opened a topic over on their support forum as well to see if they have any insight into how I'd go about changing this bit of code I'll follow up here if they have a solution incase anyone else ends up with the same issue.
Thanks for the speedy replies
not familiar with headaway - using it that is, have heard of it...
and themes have many, many ways to output comments count... could be single.php or other... and themes can do their own thing too...
maybe we can try something real quick... in the spFunctions.php file of the theme you are using (in the template files dir), try adding this code into it at the bottom, but inside the closing }
add_filter('get_comments_number', 'my_comments_count', 10, 2); function my_comments_count($count, $postid) { $total = 0; $links = sp_blog_links_control('read', $postid); if ($links) sp_forum_api_support(); if ($links && sp_get_auth('view_forum', $links->forum_id)) { $sfpostlinking = sp_get_option('sfpostlinking'); # link found for this post $total = sp_get_posts_count_in_linked_topic($links->topic_id, $sfpostlinking['sfhideduplicate']) - 1; } $count = $count + $total; return $count; }
and lets see if that does anything...
Visit Cruise Talk Central and Mr Papa's World
Thanks for the try, but adding this code doesn't seem to have any effect on what is counted as comments on the blog post.
okay, will have to dig deeper... that was a try at using the new wp filter on the comment count and adding in our comment count...
headway may be doing it non standard..
lets make sure its getting called at least... right after the function definition (before $total = 0), add
vshow('here');
and see if that shows up in the display...
Visit Cruise Talk Central and Mr Papa's World
I'm not sure if this is related, but I just noticed that the comments which are passed to the linked post from the forum don't show up as comments in my WP dashboard even though they are displayed within the post on the blog.
Mr Papa said
okay, will have to dig deeper... that was a try at using the new wp filter on the comment count and adding in our comment count...headway may be doing it non standard..
lets make sure its getting called at least... right after the function definition (before $total = 0), add
vshow('here');
and see if that shows up in the display...
This again doesn't seem to do anything. Although I'm not sure what you mean by "shows up in the display".
1 Guest(s)