WordPress.org

Ready to get started?Download WordPress

Forums

WP 2.7 Comment Threading & Styling (4 posts)

  1. Saberj
    Member
    Posted 5 years ago #

    I'm hoping someone could help me with a quick CSS question concerning Comment Threading in 2.7. I'm heavily modifying a theme (http://www.themeforest.net/item/our-community/15953) that recently updated to 2.7 support. Unfortunately, the update didn't quite get it right, and the theme author said she was leaving for a few days for the holidays. I'd really like to get this worked out quicker than that.

    Here is a screen shot of what is happening:

    http://img220.imageshack.us/img220/7738/multiptagsij3.jpg

    The problem occurs because of the way the CSS is setup. The text of the comment is setup via CSS with something similar to this:

    [code]
    #comment-area ol li p {style.css (line 1001)
    background-color:#F3F3F3;
    border:1px solid #E0E0E0;
    float:left;
    min-height:150px;
    padding:10px;
    width:475px;
    [/code]

    Obviously, the problem is that the css is setting a style for each paragraph. So anytime a new paragraph begins, boom, new box.

    So my question is this, what is the correct way to refer to the text in a comment box? Is there a div tag that refers only to the text? Or some sort of CSS trick to only format the text?

    I would appreciate any help...

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    It can't be done with the default settings. You'd have to make a custom callback to display your comments with a div around the comment text.

    http://clarktech.no-ip.com/wordpress/wordpress-27-comment-callback-function

  3. Saberj
    Member
    Posted 5 years ago #

    ...yeah, that's far outside my scope of understanding. I guess I'll just wait for someone that knows what they are doing to write a function for that. Surely to God someone will see the need for the ability to style the comment text separate from everything else sooner rather than later.

    Thanks, Otto.

  4. Saberj
    Member
    Posted 5 years ago #

    Just sorting through the information available in the docs section. I came across http://codex.wordpress.org/User:Skippy/Plugin_Hooks

    Can anyone tell me if get_comment_text is still a valid function for WordPress? Could I perhaps use that to style the text? I'm not sure how else I would pull out just the text in the case of a callback...

    I honestly am confused by why the text doesn't already have some sort of class or ID to set it apart. It seems pretty likely that theme authors will want to style the text differently at times. Especially when you can get just about everything else separated to style.

    But in any case, if I can just fine a solution, it won't really matter.

Topic Closed

This topic has been closed to new replies.

About this Topic