• Resolved flipz

    (@flipz)


    Hey all. I have been using the mystique wordpress theme on my site http://geekfor.me for a while now and I absolutely love it. I only have one question. Right now the comments will highlight the post author by changing the comment header background which is perfect. What I’m wondering is if there is a way to make it so it will either (a) highlight every site author/editor’s comment site wide, regardless of what post they comment in or if that’s not possible (b) if there is a way to make it highlight a specific user based on their logged in user name or id.

    I know that this will require me to modify the php which in general I can handle, but I can’t find where this code is.

    In the style.css I found

    li.comment .comment-head{background-color:#5e5e5e;background-repeat:no-repeat;background-position:left bottom;position:relative;color:#e4e4e4;padding-bottom:6px;}
    li.comment .comment-head.comment-author-admin,li.comment .comment-head.bypostauthor{background-position:-1000px bottom;color:#fff;text-shadow:rgba(0,0,0,0.4) 1px 1px 1px;}

    I don’t really know css but it looks to me like that’s the difference between a comment head and an author comment head. I assumed that the if statement required to pick which style would be used is in comments.php but I can’t find it anywhere. I tried searching through comments.php for any mentions of the words author or admin, I even looked at every if statement and I just can’t seem to find one that is checking to see if the user is the post author. Can anyone point me in the right direction? I have found multiple sites talking about how to add author highlighting to a theme, but this theme already has it. And the way that they describe how to do it… I can’t match up any of it to this one.

    If it helps you figure out what I’m asking… I have a tech-related website. There are a couple of users that comment on it that know what they are talking about and I’d love for them to be able to stand out just the same as me. As an easy work around I tried installing co-authors pro and adding them as authors to a post (that’s not at all how I wanted to do it, but I just thought it would work) but it didn’t.

    So again… I’m fine with editing the php if I just know where I’m supposed to look. I would like the option to either highlight every author/editor on every post, or to highlight certain people based on their user name or user id… whichever option is easier for you guys to help me with is fine by me.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • first, update to mystique 1.65, then go to the settings page and click on the User CSS tab. Add this:

    li.comment.reader.name-mary .comment-head{
      background-color:#f29f00; /* orange */
      background-image:url(http://yourwebsite.com/wp-content/themes/mystique/images/_alt/comment-head-trans.png);
      color: #fff; /* white (text color) */
    }

    change the reader-name (“mary”), color codes and website link with yours.

    if you want to style a registered user’s comment change reader.name-mary with user-mary

    you can also style a comment based on the comment author role or comment position like odd/even, depth…

    and here’s another CSS tweak I’d recommend for your site and other sites that have a very long title/tagline:

    #site-title #logo{float:none;display:block;}
    #site-title p.headline{float:none;border:0;display:block;margin:0;padding:0;line-height:normal;}
    Thread Starter flipz

    (@flipz)

    Hey, thanks for the help… and from the author himself! Very cool. 🙂

    What you suggested worked perfectly except for one issue. It seems as if all nested comments under this specific user are also getting marked in the highlighted color.

    You can see an example below. noj is the guy I wanted highlighted. I left it in orange just so it stands out and you can see it.
    http://geekfor.me/new-release/fresh-rom-1-1/#comment-508
    In that example I was the original comment, then noj under me in orange, but then every comment threaded under his is also orange.

    Here’s what I added to users css:

    /* Noj highlight */
    li.comment.user-Noj .comment-head{
      background-color:#f29f00; /* orange */
      background-image:url(http://geekfor.me/wp-content/themes/mystique/images/_alt/comment-head-trans.png);
      color: #fff; /* white (text color) */
    }

    I also applied the second tweak that you suggested for the title and it looks good. Thanks again!

    here you go:

    /* Noj highlight */
    li.comment .comment-head.user-noj{
      background-color:#f29f00; /* orange */
      background-image:url(http://geekfor.me/wp-content/themes/mystique/images/_alt/comment-head-trans.png);
    }
    
    /* Highlight "Rokair" */
    li.comment .comment-head.user-rokair{
      background-color:#3873bd; /* blue */
      background-image:url(http://geekfor.me/wp-content/themes/mystique/images/_alt/comment-head-trans.png);
    }

    or

    /* Highlight all editors */
    li.comment .comment-head.role-editor{
      background-color:#d91d27; /* red */
      background-image:url(http://geekfor.me/wp-content/themes/mystique/images/_alt/comment-head-trans.png);
    }

    and another suggestion – you should remove the search widget title, it looks better without 😉

    Thread Starter flipz

    (@flipz)

    Looks like removing “.comment-head” was the trick. Works perfectly now! Thanks so much for your help. I also removed the search bar title. I know absolutely nothing about design haha. But you’re right… looks good. 🙂

    Your project has officially been supported via the link on your blog. Thanks!!

    -flipz / brent

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Comment highlight multiple users? mystique theme’ is closed to new replies.