Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Comments, trackbacks & pings »

[SOLVED] Quick/Dirty Comment Numbering

Prev Previous Post   Next Post Next
Old May 24, 2010, 10:49 AM
139 posts · Oct 2009
[SOLVED] Quick/Dirty Comment Numbering

Here's how I did a quick comment numbering. No add-ins required, just edit two files (after making backup copies, of course).

Use the Editor to open the bfa_custom_comments.php file. Add the following after about line 4 (the "global $bfa_ata" line):

global $mycommentnumber;
In the same file, insert code similar to this where you want the comment number to appear ( I put it just before the 'printf" command at about line 25)

echo "(# " . $mycommentnumber . ") ";
Save the bfa_custom_comments.php file.

Then edit the "comments.php" file. After about line 12 (where it says "You can start editing below"), add these two lines:

global $mycommentnumber ;
$mycommentnumber = 0;
Save the file, and your comments will have a numbering like this:

(# 12)
The number will have the same style as the date/time line in the comment. If you want to change that, then use something like this in the bfa_custom_comments.php file:

echo "<div class = 'mycommentnumberstyle'>(# " . $mycommentnumber . ") </div>";
And then add the 'mycommentnumberstyle' style to the "add CSS/HTML inserts" section in the Atahualpa theme options.

Of course, make a backup copy of the files before you edit them, and save a copy of the changes somewhere so you can re-do them in case of a update.

Enjoy: it's not fancy, but it will work.



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Numbering Comments f14testing@gmail.com Comments, trackbacks & pings 7 May 25, 2010 12:14 AM
[SOLVED] Numbering comments using Greg's Threaded Comment Plugin perdox808 Comments, trackbacks & pings 7 Dec 6, 2009 10:16 AM
Down and Dirty SEO juandrah Plugins & Atahualpa 5 Sep 24, 2009 08:52 PM
Please help... Comment numbering jmarsden92 Comments, trackbacks & pings 1 Jul 28, 2009 04:23 AM
[SOLVED] quick one - flash in the header mcphoto Header configuration & styling 2 Apr 30, 2009 07:57 AM

All times are GMT -6. The time now is 10:48 AM.

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