ThemeShaper Forums » Thematic

[closed]

using CSS for lowercase title attributes?

(6 posts)
  • Started 2 years ago by lowercase-r
  • Latest reply from helgatheviking
  • This topic is resolved
  1. i'm a beginner to the wonderful world of wordpress and thematic themes/child themes alike... so please excuse this rather obtuse question:

    just where the heck in any of the .php files (in either WP or thematic) is the title attribute for the comment-meta permalink defined?

    my goal is making all the text (title attributes included) in the comment-meta lowercase, and was able to do so (except for the permalink's title attribute!) by slipping a text-transform into thematic's default.css file, like so:

    #comments-list .comment-meta {
    color:#666;
    font-size:11px;
    padding:0 0 9px 0px;
    text-transform: lowercase;
    }

    but i'm going mad trying to find where WP is drawing the "Permalink to this comment" title attribute from. (a visual depiction of what i'm talking about: http://adumbrate.me/show-n-tell/permalink%20title%20attribute%20not%20lowercase.png)

    is it possible to somehow use CSS to make this title attribute lowercase if i can't located where it's being pulled from in any of the .php files?

    thanks in advance for the help!

    Posted 2 years ago #
  2. proto
    Member

    Hi there,

    A few Thoughts:

    1: From what you've said it sounds like you're editing Thematic directly. I would advise strongly against this, you should use a child theme, it has SO many benefits, too many to list here but in a nutshell, if you develop your website in a child theme it will be protected from future upgrades (thematic is updated on a regular basis) and retain all that unique styling (such as your desired lowercase styling). If you continue to edit Thematic directly you will lose updates when Thematic itself is updated. Also you may break something in Thematic, editing the PHP files directly is not recommended. The good news is that building a child theme is easy once you know how! For more information and before you do ANYTHING else I would highly recommend reading this, it's short and tells you why: http://themeshaper.com/2009/04/17/wordpress-child-theme-basics/

    There's more on child themes here: http://themeshaper.com/thematic/guide/?page_id=66

    If you look in Thematic file you downloaded it comes with an example child theme, look inside your Thematic download file for the folder "thematicsamplechildtheme". When you alter a style in your child theme it overrides the parent theme (Thematic) styling so you can have your website as you want and upgrades don't lose all your hard work styling it to get it how you want!

    2: What you're looking at changing sounds like a CSS issue. So, for example, you identified that "#comments-list .comment-meta" needed changing to make the text lowercase and you edited the CSS. The second big tip of the day which will make your life SO much easier. Get firebug for Firefox. Once you get this you can use the tools in that program that help you identify what DIV or CLASS you need to change to get your desired styling in your child theme stylesheet.

    If you post a link to your website we can look at it, but you will be so happy once you see what Firebug can tell you and it will enable you to get your website how you want it. Remember, I would recommend using a child theme before you do anything else, you'll almost certainly be happier and understand why when you read the article above I suggested and implement it.

    Someone else here might have some other thoughts but that's my advice!

    Good luck!

    Posted 2 years ago #
  3. you can't use CSS to switch markup to lowercase. the 'permalink' line is part of the thematic_commentmeta() function which you can either completely override, or more likely filter. the filter is named the same thing.

    if you don't care to change anything by the case of the letters you should be able to do:

    function kia_lowercase_commentmeta($content){
      return strtolower($content);
    }
    add_filter('thematic_commentmeta','kia_lowercase_commentmeta');

    strtolower php function: http://php.net/manual/en/function.strtolower.php

    /*edited to fix syntax in code*/

    Posted 2 years ago #
  4. @proto

    thanks so much for your advice. i have been working in a thematic child theme, but, unfortunately my command of php and jscript commands are rudimentary at best, so i had been resorting to just combing through the php files and manually changing what i wanted.

    i have been working on chrome and using its 'view source' feature to debug code, but it only handles tracing back css styles, NOT php source content (EXTREMELY frustrating...).

    i've since DL'd firefox and have firebug up and running, will see what it can do. thanks again for the advice.

    @helgatheviking

    yes! thank you! this is what i've been looking for.

    i'll see if i can inject the code where it should be, and will report back.

    thanks!

    Posted 2 years ago #
  5. btw- chrome has built-in developer tools. it is in the menu somewhere, but you can also hit CTRL-SHIFT-J

    Posted 2 years ago #
  6. i'm going to mark this thread as resolved. open it back up if this code doesn't work for you. it should since i have tested it. be sure you get the updated bit as i had a ; where it didn't belong before.

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.