can you paste the full code of the file (whatever you are working on) into a http://pastebin.com/ and post the link to it here, so one can see the code snippet in its context?
there is a variable $depth
(i am not sure if its global) which is used in wp_list_comments()
, and this might also output a .depth-4
css class (depending on what code is used).
what theme are you using?
can you post a link to your site?
instead of asking a very limited question, to which there is probably no direct answer, can you describe what you are trying to achieve?
Thread Starter
kanote
(@ryniek)
I use Scylla-Lite theme.
Thanks for this hint about $dept var, now i’ll try find solution myself – when i end i’ll post it here.
Cheers
Thread Starter
kanote
(@ryniek)
My temporary solution:
added this code to style.css
.depth-4 .comment-body .comm_reply {
visibility: hidden;
}
because i wanted to set such restriction: for every comment with depth level of 4, Reply button for this post must be hidden, because i want only 4 levels depth for comments under post. By now, it’s the easiest way 😛
You can check whether the comment has a parent “$comment->comment_parent” to find whether you’re at the top level and potentially recreate the comment tree to know what level you’re at…
Thread Starter
kanote
(@ryniek)
Thanks, but how do i know, which variables i should use, to fetch $comment global variable? I’ve searched in Codex WordPress and found nothing about $comment variable. Does it mean, i have to browse through WordPress source code and find it myself?
(@ryniek)
12 years, 8 months ago
I can’t find function that could retrieve with informations like comment id .etc, also comment’s depth level. I know that there’s global variable $comment, but there seems it doesn’t allow to retrieve the depth level.
I’ve tried:
but this does nothing – there’s nothing like depth_level i guess.
Can someone help?