Support Forum
Hi guys,
I've had a search and couldn't find the solution to this.
This is my first post, and I'd just like to say that I am really enjoying the ease of using Simple:Press and that it's a great forum. Thank you for your hard work.
I have used the blog linking to great success - it works!
The only thing that is not perfect is that only the comments I make on the front end of my blog get recorded such that it will display '5 comments' - even though there there may be a total of 15 comments to read (10 comments made on the forum).
How can I change this so that the comments counter acknowledges the posts made on the forum as a comment, too.
To rephrase if I am not making myself clear is that although the linking itself is working perfectly, the 'number of comments' is not accurate as it does not count the comments from the forum.
I realise that the solution needs to correct the counting of comments within the singlepost.php and also on the front end of my blog ie. 'recent posts' as they are all inaccurate.
I hope this makes sense, if not I will be happy to clarify.
I have no knowledge of php - so if you would like I could copy and paste any code from my theme at your request in order to diagnose and correct the issue.
Kindest regards.
JG
may need Andy to weigh in here since he wrote the blog linking plugin, but lets give it a shot...
so you are successfully getting comments synced between the blog post and the forum topic? just the count is not correct on the blog post?
can you look in the theme comments.php file (assuming it has one) and see how it is accessing the comments? if its relatively recent theme, its likely accessing it via
wp_list_comments()
with some arguments... I would like to know what those arguments are...
Visit Cruise Talk Central and Mr Papa's World
Hi Mr. Papa thank you kindly for your swift reply.
Mr Papa said
so you are successfully getting comments synced between the blog post and the forum topic? just the count is not correct on the blog post?
Yes you are absolutely correct.
Later today, when I get a chance, I will copy and paste the comments.php. From memory, I can confirm that it did have the 'wp_list_comments()'.
Thank you kindly, I will be back later today!
JG
Actually we can probably do a little better than this.
The most common WP function for displaying the number of comments is a function called comments_number().
Take a look through the comments php file to see if you can find this function being used. If it is - comment it out and replace it with the following:
spCommentsNumber("0 Comments", "1 Comment", "% Comments", true);
Replacing those labels with your preferred text of course.
YELLOW
SWORDFISH
|
YellowSwordfish,
That has worked perfectly, thank you.
This is the result:
It now displays the correct number of comments at the bottom.
I also used your code to edit the following in single.php - and it too worked. The image below shows before I used your code.
I changed 'comments_popup_link('0','1','%');' in single.php to what you have suggested, and that has worked perfectly!
However, I couldn't find an obvious place to insert your code for it to work with the recent posts widget (see pic). This is what it displays on my home page - showing 5 comments, not 11. Any ideas, sir?
I suspect I have to change something with the widget?
Thank you for your help!
I could send you the entire widget code at your request but there's quite a lot in there.
Searching for the term 'comment' this is what comes up:
<span class="block-meta"><?php the_time('F j, Y'); ?>, <?php comments_popup_link(); ?></span>
</div>
<?php endif; ?>
<?php $counter++; endwhile; ?>
1 Guest(s)