Two questions; comment style & plugin problems (2 posts)

  1. Calavera
    Posted 6 years ago #

    Greetings there wordpressers!

    I'm a newbie at this WordPress stuff, but I decided to make use of my domain and put something up. So three days ago I opened up Photoshop and got started, and this is what I got as of now:

    Not being the best at layouts and knowing pretty much nothing about CSS or WordPress when I started the results are obviously not that good, but things have worked out OK.
    There are however a few things I can't seem to figure out.

    1) I can't seem to find a way to edit the comment style. I mean the part with the commentators nick, the date, the comment itself etc.
    I'd for example like to give them more rowspace and remove the comment numbering.

    2) I can't seem to get either the Thumbnail Viewer / Lightbox or Share This plugins to work. I have installed them exactly as instructed, but they just don't seem to wanna work.

    Any help is greatly welcome, and if anyone wants to give constructive comments on the coding/layout itself, feel free to do so too.

    Thank you in advance!

  2. CallUp
    Posted 6 years ago #

    You will need to define your custom callback function in your theme's functions.php file. Here is an example:

    function mytheme_comment($comment, $args, $depth) {
    $GLOBALS['comment'] = $comment; ?>
    <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
    <div id="comment-<?php comment_ID(); ?>">
    <div class="comment-author vcard">
    <?php echo get_avatar($comment,$size='48',$default='<path_to_url>' ); ?>

    <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?>
    <?php if ($comment->comment_approved == '0') : ?>
    <?php _e('Your comment is awaiting moderation.') ?>

    <?php endif; ?>

    <div class="comment-meta commentmetadata">comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?><?php edit_comment_link(__('(Edit)'),' ','') ?></div>

    <?php comment_text() ?>

    <div class="reply">
    <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>

    Note the lack of a trailing . WordPress will add it itself once it's done listing any children and whatnot.

    From this page.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.