Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   Creating a Comment Counter in Byline (http://forum.bytesforall.com/showthread.php?t=1888)

Jcasteli Jun 2, 2009 06:31 PM

Creating a Comment Counter in Byline
 
How might I create a comment counter in the Byline?

Example:

Comments (6)

And in addition have the the text link directly to the comment section.

Thank you.

www.twobackpackers.com

Flynn Jun 4, 2009 01:56 PM

See Theme Options -> Post / Page Info Items

"Post / Page Info Items" are the little pieces of informational text and/or links that you can put above or below each post or page, i.e. a comments link with amount of comments

Jcasteli Jun 7, 2009 04:44 PM

Am I able to simply count the number of total comments associated to a post and place that in the byline, or do I need to activate a plug-in that counts the comments? I am sorry, I don't think my earlier question was clear. I just don't know how to make it count comments. I see your two examples under Post/Page Info Items, but they don't just count the comments.

Example: %comments('Leave your comment', 'One comment so far', '% people had their say - chime in!', 'Sorry, but comments are closed')%
Example 2: %comments('Comments', 'Comments (1)', 'Comments (%)', 'dontshow')%

Looking to create this:

| Comments (6) |

juggledad Jun 8, 2009 01:30 PM

RTM - from the ATO->Post/Page Info Items->Post Info Items documentation
------------------
%comments('No comments', '1 comment', '% comments', 'Comments closed')% - Displays a link to the comment section of the post. The link text depends on the comment count & status (open/closed).

When using this item, provide 4 text strings for the 4 possible comment states:

Replace 'No Comments' with your link text for posts that have no comments yet

Replace '1 comment' with your text for posts with 1 comment

Replace '% comments' with your text for posts with 2 or more comments. The % (percent) character will be replaced with the comment count. Use that character in your own text, too, unless you do not want to display the comment count.

Replace 'Comments closed' with your text for posts where comments are closed. Replace 'Comments closed' with 'dontshow' to display nothing if comments are closed (instead of displaying something like 'Comments closed')

Jcasteli Jun 8, 2009 03:05 PM

Yes, I have read the examples, but was looking to just do a simple Comment count. So, if I understand how you want me to do this I would type the following correct?

Posted by <strong>%author-linked%</strong> in <strong>%categories-linked(', ')% </strong> on <image(date.gif)><em>%date('F jS, Y')%</em> %comments('% Comments', '% Comments', '% Comments', '% Comments')%

I always want the results of:

% Comments


% = whatever number of comments exists.

juggledad Jun 8, 2009 03:49 PM

The % won't work for the first two so you will need this

'Posted by <strong>%author-linked%</strong> in <strong>%categories-linked(', ')% </strong> on <image(date.gif)><em>%date('F jS, Y')%</em> %comments('0 Comments', '1 Comments', '% Comments', '% Comments')% '


All times are GMT -6. The time now is 02:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.