• Resolved smoothyjones

    (@smoothyjones)


    hi!

    i am working on my template, and comment time/date are showing up in one continuous timestamp tag:

    <time datetime="2015-12-21T19:09:49+00:00"> december 21st, 2015 on 19:09 </time>

    i would like to have the time of day be wrapped in a span tag, so i can style it differently than the date, with css. the comment.php file on my theme uses this to list the comments, and there’s no way to edit the timestamp here:

    <ol class="comment-list">
            <?php
                wp_list_comments( array(
                    'style'       => 'ol',
                    'format'      => 'html5',
                    'short_ping'  => true,
                ) );
            ?>
        </ol>

    i tried looking at my theme’s functions.php, as well as wordpress’ include files: comment.php and comment-template.php. none of them deal with the actual tag structure of the time-stamp, so there was nothing there for me to play with.

    does anyone have any idea how i can do this? obviously, i’d rather do it in my theme’s functions.php than alter the wp inc stuff..

    thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter smoothyjones

    (@smoothyjones)

    got it. the comment’s HTML structure in my theme is located in this file:
    wp-includes/class-walker-comment.php

    this is where i can edit the specific HTML structure of the time and date and have them seperated.

Viewing 1 replies (of 1 total)
  • The topic ‘how to change a comment's html structure’ is closed to new replies.