• Hi,
    First, thanks to WP community and developers to create such a great blog, wich has been very easy to set up and maintain through time. However, questions are set to come one day, and here’s is my little problem I hope somebody can help me with.
    I currently looking for a sollution, where I’m able to set an attribute taken from the title of the posting, to my comment link in the end of each posting, so it’s possible to get my long wanted AA rating over at Bobby. This is my last obstacle for breaking that problem as far as I can see.
    I’m currently looking in the template-functions.php within the include folder for any ideas for what and where I should alter a line of code or something.
    So, as you can see, I’m probably in the wast wilderness now, and maybe not. If somebody has an idea, let me know, I’ll be grateful for ever if so happens!
    My english is rather poor, so I hope you understood what I ment. ??
    Cheers folks,
    Petter / Norway

Viewing 6 replies - 1 through 6 (of 6 total)
  • Your english was pretty good. However, not knowing what “AA rating over at Bobby” means, or what adding an “attribute from the title” to the “comment link” really means, I’m lost… ??
    Can you give a VERY specific example like “Here’s an example title. Here’s what I want to try and grab from it. Here’s where I want to use that information.”? That’ll be of great help for us to aid you!
    -d
    https://www.chait.net

    If I’m not mistaken, the Web Content Accessibility Guidelines 1.0 (which gives your A, AA, or AAA ratings) wants you to use title attributes on links when more than one link on a page points to the same id.
    So, since all the comment links end in #comment, the comment links should have a title. For example:
    Comments(3)
    Is that what you mean, Petter?
    -Tony

    I think he means he want the title of a Post to also be the value of the title attribute for the Comments (0) hyperlink. So if I had a post like “Hi from Hawaii”, the Comments (0) title=”some_method_that_retrieves “Hi from Hawaii”” from DB.
    I

    OK… I’ve solved it (i think) at least it works for me:
    echo ' title="';
    echo get_the_title();
    echo '"';

    I wrote this on he lines just before the echo '/>'; line in the function mentioned in the post abowe. (The function resides in functions-template.php)
    Anyone: Could this have been solved in a better way using more effective PHP code? I tried to make a variable, but echoing it did this in the HTML: title=”$myvar”
    BUT… for AA you must also do this to each category that is listed under your post (ie: news, or_whatever_categories_you_have).
    cheers – Andreas

    Thread Starter peTRE

    (@petre)

    I would thank everyone wich contributed with sollutions, and XepoX’s last input gave me the exact recipe I needed.
    Againg, thankyou, and I look forward to see more development of this powerful blog i the future! Keep the good work up, you all!
    Petter

    XepoX- would you mind posting another example, I would love to have this working as well but i’m not following you exactly because my comment popup is off and i’m not great with php..
    Is the mod you made in the wp-comments file or the index file?
    thanks!
    ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Comment atribute’ is closed to new replies.