WordPress.org

Ready to get started?Download WordPress

Forums

Little fix (5 posts)

  1. Tokonik
    Member
    Posted 4 years ago #

    I would like to be able to caps out the username of the user who commented on one of our articles in the recent comments section of our website. http://www.triplecz.com is the website. I am basically doing this because I am debating a couple of things, much too long to explain here but can anyone just confirm or deny if this is possible ?

    Or if there is another way to transform someone's user name when they comment to show up as CAPS when they comment on one of our articles so it automatically shows up that way in the recent articles section. If anyone would be able to give me any type of input it would be greatly appreciated.

  2. Peter Boosten
    Member
    Posted 4 years ago #

    Yup, look here

    Peter

  3. Tokonik
    Member
    Posted 4 years ago #

    Hey peter, thanks for the quick reply! I wanted to ask, this is the my footer code;

    <ul class="footerbar-center-in">
    <?php $sql = "SELECT * FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' ORDER BY comment_date DESC LIMIT 0 , 4"; $comments = $wpdb->get_results($sql); foreach ($comments as $comment) { $data = $comment->comment_author . " @ [" . $comment->post_title; echo "

  4. comment_post_ID) . "\">" . substr($data,0,40) . "]
  5. "; } ?>

    Where should I put this code ?

    <html>
    <head>
    <style type="text/css">
    p.uppercase {text-transform:uppercase}
    </style>
    </head>

    Between the entire text for the footer code ? Kinda confused :/

  • Peter Boosten
    Member
    Posted 4 years ago #

    In your style.css:

    #content .post .comments ol li cite {
    color:#FFFFFF;
    font-style:normal;
    font-weight:bold;
    text-transform: lowercase;
    }
  • Tokonik
    Member
    Posted 4 years ago #

    thank you so much!

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags