Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Blog posts with forum comments show "0 Responses to Article"
Avatar
Grant Barrett
San Diego, CA
Member
Free Members
sp_UserOfflineSmall Offline
Jul 19, 2012 - 9:42 am

I've just gone live with the latest version of the forum. I'm syncing the comments so that comments posted on the blog posts show in the forum, and comments posted in the forum show up on the corresponding blog post.

Everything seems to be working well, but there's one niggling thing. On the blog post, comments originating in the forum are not counted. So this blog post, which has a number of forum comments, shows "0 Responses to Why Do Auctioneers Talk So Fast?":

http://www.waywordradio.org/auctioneers/

I saw something similar mentioned here but I did not see a resolution:

https://simple-press.com/suppo.....p/#p103144

A Way with Words, North America's number one broadcast program about language!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 19, 2012 - 10:25 am

It depends how your WP comments template retrieves and displays the comment count.  The most common is by using the WP template tag comments_number().

If this is the case then this can be replaced by:

spCommentsNumber("0 Comments", "1 Comment", "% Comments", true);

which has the same format but wll add the topic posts and blog comments together.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Grant Barrett
San Diego, CA
Member
Free Members
sp_UserOfflineSmall Offline
Jul 23, 2012 - 6:31 pm

Thanks for the reply. So you're saying I should modify the template directly? Or would I be able to put this in the user function.php file? I ask because I use the PageLines framework and I am reluctant to futz directly with the code, and I don't see how I can use the function you've suggested without doing that.

A Way with Words, North America's number one broadcast program about language!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 23, 2012 - 8:23 pm

you would want to modify the wp theme comments template file...  typically comments.php but themes can do it many ways...

or if the theme is well written and provides some hooks to be able to get at it without modifying the actual files, that would work... many of the better themes have a bunch of hooks these days...

Avatar
Grant Barrett
San Diego, CA
Member
Free Members
sp_UserOfflineSmall Offline
Jul 24, 2012 - 5:27 am

On the PageLines (the framework I'm using) site, one of the developers tells me:

We use http://codex.wordpress.org/Tem.....nts_number
In comments.php
printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'pagelines' ),

I'm willing to modify comments.php, if necessary, but I want to make sure there's not a way to change this that doesn't mean my modification will be wiped out the next time the template is updated.

A Way with Words, North America's number one broadcast program about language!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 24, 2012 - 5:56 am

That is currently the only way we do it.
There is a planned task for some updates to blog linking and I am pretty sure we will be able to then offer a better alternative as WP have added some new filters that I think we can use. I have no date or version for that particular update as yet as that is still to be decided.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626