Forums

How to style WP 2.7 threaded comments (45 posts)

  1. baal666
    Member
    Posted 11 months ago #

    Thanks, I will try this.

    If I ever have to add another class, your function may not be very good as it can only add one class, if I understand well (BTW, the second code the first "top" should be replaced by "bottom"... typo). So unless I use the classes already available on WP 2.7 (as stated by cdharrison) it is my understanding that I will be limited to those and only one more if I use your hack.

  2. Otto42
    Moderator
    Posted 11 months ago #

    Again, I don't know why you think that that code can add only one class.

    function comment_add_whatever($classes) {
    	$classes[] = 'top';
    	$classes[] = 'bottom';
    	$classes[] = 'left';
    	$classes[] = 'right';
    	$classes[] = 'sideways';
    	return $classes;
    }
    add_filter('comment_class','comment_add_whatever');

    Also, your top and bottom thinking *won't work*. Just by them having two classes doesn't make it two different things. What's more, you don't NEED to add any classes to reference them in CSS. This is plainly obvious if you understood CSS at all. A simple .commentlist li references all the comments. Adding useless "top" and "bottom" classes to them doesn't help you in any way. Those CSS names are *arbitrary*. They have no inherent meaning.

    I highly suggest you learn a bit more PHP, HTML, and CSS before attempting this. It just seems a lot like you're in over your head here. You've made several basic and fundamental errors in this thread, and I just don't think you understand enough about web design to do this sort of thing.

  3. baal666
    Member
    Posted 11 months ago #

    That's exactly BECAUSE I am not a pro that I don't think 2.7 is a great achievement so far. Whatever you think of my CSS and PHP skills, I used to be able to hack my way to do what I wanted to do with 2.6, and it is far more difficult with 2.7

    Thanks anyway.

  4. Otto42
    Moderator
    Posted 11 months ago #

    I used to be able to hack my way to do what I wanted to do with 2.6, and it is far more difficult with 2.7

    Yes, I suspect that is true. However, 2.7 is not designed for the "unknowledgable hacker", it's designed for developers. I mean, what if somebody made a plugin that made customizing your comments really simple? Wouldn't you prefer that? 2.7 makes designing such a plugin much, much simpler.

    The general WordPress goal is more along the lines that customization should not involve writing code. In the long term, that is the end-goal. WP 2.7 is a step towards that direction by standardizing the comments system.

  5. cdharrison
    Member
    Posted 11 months ago #

    Regarding the original topic for this thread... here are some additional Wordpress 2.7 Comment Style Starters you can use... Hope it helps!

  6. baal666
    Member
    Posted 11 months ago #

    Very interesting cdharrison. Thank you very much.

    By the way, how would you integrate a background image behind the avatar? I've tried, but failed every time.

    I was able to get the image but it would not go far enough to the left or the avatar was at the correct place but without the image behind it.

  7. baal666
    Member
    Posted 11 months ago #

    Question here: I installed this and it works fine... but for one thing: when I click "Reply" instead of making place for the form right below the comment where I clicked, it links to the bottom of the page. Is there any way to make it work correctly?

    Thanks

  8. Otto42
    Moderator
    Posted 11 months ago #

    Did you add the wp_enqueue_script code to your theme's header.php file? I mention that on my post here:

    http://ottodestruct.com/blog/2008/09/29/wordpress-27-comments-enhancements/

    That script call is what makes the reply links work properly.

  9. baal666
    Member
    Posted 11 months ago #

    It works perfectly now Otto. Thanks a lot!

    Everyone should go take a look at your page.

  10. baal666
    Member
    Posted 11 months ago #

    I now use Otto's script for displaying reply below comments and Chris Harrison's CSS and it works well. However, I have trouble setting a different background color for bypostauthor for replies.

    I set ol.commentlist li.bypostauthor {background:#333333 ;}

    and I correctly see a different color when I write a comment in the main place. However, it does not do anything when I reply.

    So I tried this:

    ol.commentlist li ul.children li.bypostauthor {background:#333333 ;}

    but it did not work either. Anyone has any idea?

    Thanks

  11. Otto42
    Moderator
    Posted 11 months ago #

    Change it to just ".bypostauthor" instead.

  12. baal666
    Member
    Posted 11 months ago #

    The problem seems to be more important than this... In fact, I can't see a different color when I post for a very simple reason: my new 2.7 WP installation does not recognize me...

    Well, I can log in, and do whatever I do, but when I go back to the comments file, I have to re-enter my informations and even if I manually write them correctly, wordpress treats me as if I was a complete stranger.

    I guess this is where the problem started.

    If you have time, I describe the problem here:

    http://wordpress.org/support/topic/224549?replies=5

    Thanks.

    BTW, I like WP 2.7 more and more. It's a difficult nut to crack, but thanks to people like you and Chris, it seems easier now.

  13. neologan
    Member
    Posted 2 months ago #

    this is to otto really. do you know how to make children avatars smaller than parent comments? I outline what i was after here, if you can help:

    http://wordpress.org/support/topic/308302?replies=1

  14. Kyala
    Member
    Posted 1 week ago #

    Chris,

    Thanks so much for that sample CSS. Saved me hours of swearing and tweaking around with an old theme that didn't support threading.

  15. nadish
    Member
    Posted 1 day ago #

    Hey Guyz!!!

    Can anyone tell me how to stylize comments display like seomoz.com???

    Thanx

Reply

You must log in to post.

About this Topic