I'd like to have the post number shown for each post. I'm hoping that bbPress already has this functionality, and I would need to do is insert some code into my template. Or do I need a plugin?
bbPress support forums » Themes
Numbered Posts
(9 posts)-
Posted 1 year ago #
-
It has post numbers, but they aren't like 1, 2 ,3 etc. Every post (doesn't matter in what part of the forum) get's a number when it is created, so if you want to show these form 1 post you will get someting like: 10, 15, 28 etc (do I make any sence?)
Perhaps a plugin can add a counter starting at the top post with 1, but you wouldn't be able to link to this post with that nr if you want to do that...
Posted 1 year ago # -
Actually I think it does work. There was something I saw here about the OLs in threads having startnumbers (which didn't validate was the point, I think), implying that you could change the OL styling and possibly display the (in the context of the thread) proper post numbers. I'll look into it, if someone else doesn't already know?
Posted 1 year ago # -
The
post_positionin thebb_posttable has the correct number for each post. I don't know much about php, but I made a little plugin for my forum, which seems to work.function get_post_num() { global $bb_post; return$bb_post->post_position; function post_num() { global $bb_post; echo $bb_post->post_position; }?>I just place
post_num()where I wanted it to show. Hope this helps?Posted 1 year ago # -
I believe that if you attach this to your CSS file:
ol#thread li { list-style-type: decimal; }you would see the post numbers without any extra code, certainly the most elegant method. There is likely already a definition for ol#thread, so you could simply add this property to that one. Bear in mind that this is entirely untested (will try it when I get home).
Posted 1 year ago # -
I used fel64's CSS solution. Makes perfect sense (smacks his forehead... "Doh!"). Thank you!
Posted 1 year ago # -
You can in fact replace decimal with many funky things.
From w3 schools:- none
- disc
- circle
- square
- decimal
- decimal-leading-zero
- lower-roman
- upper-roman
- lower-alpha
- upper-alpha
- lower-greek
- lower-latin
- upper-latin
- hebrew
- armenian
- georgian
- cjk-ideographic
- hiragana
- katakana
- hiragana-iroha
- katakana-iroha
Still haven't tried it myself, just about to :P
Posted 1 year ago # -
Better yet, find the entry
#threadin your style.css file and change thelist-styleentry there. It makes for nicer code. :)Posted 1 year ago # -
Thanks... that is indeed where I made the change. :)
Posted 1 year ago #
Reply
You must log in to post.