• hello! please help me!
    I want to change the order of the comments but I’m not a good programmer…
    (Last comment first and so on)
    Thanks for help.
    This is my comments.php:

    <?php if (function_exists(‘comment_form_text_output’)){ comment_form_text_output(); } ?>

    <?php if ( !empty($post->post_password) && $_COOKIE[‘wp-postpass_’ . COOKIEHASH] != $post->post_password) : ?>
    <p><?php _e(‘Enter your password to view comments.’,’benevolence’); ?></p>
    <?php return; endif; ?>

    <?php if ( comments_open() ) : ?>
    <b><?php _e(‘Einfach losschreiben:’,’benevolence’); ?></b>
    <?php _e(‘ ‘,’benevolence’); ?>

    <form action=”<?php echo get_settings(‘siteurl’); ?>/wp-comments-post.php” method=”post” id=”commentform”>

    <?php if ( $user_ID ) : ?>

    <p><?php _e(‘Logged in as’,’benevolence’); ?> /wp-admin/profile.php”><?php echo

    $user_identity; ?>. /wp-login.php?action=logout” title=”<?php _e(‘Log out of this

    account’,’benevolence’) ?>”><?php _e(‘Logout’,’benevolence’) ?> »</p>

    <?php else : ?>

    <p><input type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” size=”22″ tabindex=”1″ />
    <label for=”author”><small><?php _e(‘<– Dein Name’,’benevolence’); ?> <?php if ($req) _e(‘(required)’,’benevolence’); ?></small></label></p>

    <?php endif; ?>

    <p>
    <label for=”comment”><?php _e(‘Hier schreiben:’,’benevolence’); ?></label>

    <textarea name=”comment” style=”border: 1px solid #000;” id=”comment” cols=”50″ rows=”6″ tabindex=”4″></textarea>
    </p>

    <p>
    <input name=”submit” id=”submit” type=”submit” tabindex=”5″ value=”<?php _e(‘Klicke hier zum Senden’,’benevolence’); ?>” />
    <input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />
    </p>
    <?php do_action(‘comment_form’, $post->ID); ?>
    </form>

    <?php if ( comments_open() ) : ?>
    <b><?php comments_number(__(‘No Comments’,’benevolence’), __(‘1 Comment’,’benevolence’), __(‘% Comments’,’benevolence’)); ?> <?php

    _e(‘so far’,’benevolence’); ?></b>
    <?php else : // If there are no comments yet ?>
    <?php endif; ?>

    <?php if ( $comments ) : ?>

    <div class=”commentlist”>
    <?php foreach ($comments as $comment) : ?>
    <div class=”commentBox”>
    <?php comment_text() ?>
    <i><?php comment_type(__(”,’benevolence’), __(”,’benevolence’), __(”,’benevolence’)); ?> <?php _e(”,’benevolence’); ?> <?php if

    (function_exists(‘avatar_display_comments’)){ avatar_display_comments(get_comment_author_email(),’48’,”); } ?>
    <?php comment_author_link() ?>
    <?php comment_date(__(‘m.d.y’,’benevolence’)); ?> @ “><?php comment_time() ?>

    <?php edit_comment_link(__(‘Edit This’,’benevolence’), ‘ |’); ?></i>
    </div>

    <?php endforeach; ?>

    </div>

    <?php else : // If there are no comments yet ?>

    <?php endif; ?>

    <div class=”right”><?php comments_rss_link(__(‘<abbr title=”Really Simple Syndication”>RSS</abbr> feed for comments on this

    post.’,’benevolence’)); ?>
    <?php if ( pings_open() ) : ?>
    ” rel=”trackback”><?php _e(‘TrackBack’);?> <abbr title=”<?php _e(‘Uniform Resource

    Identifier’);?>”>URI</abbr>
    <?php endif; ?>
    </div>

    <?php else : // Comments are closed ?>

    <?php endif; ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • search for reverse order comment plugins? also, might want to include wp version and theme.. some themes are built show newest first, oldest last, and others are built in reverse

    Hey all,

    I found this information on the web that was written about a year ago. Kudos to whomever hypOr is!

    After searching through wp-includes/comment-template.php I found where to implement the mod. Works with my WP v2.6 no problem. However, when it comes time to upgrade your 2.6, you will have to do this again provided the future versions don’t change this one particular function. Future versions may even include this in the admin area. I hope. 😉

    Just go here and you will see my solution. Works great!

    Zentode’s solution needs to be done everytime you update your wordpress installation. It could work. If you are making your own theme, or editing a current theme to solve your problem, I have found a quick fix that adds a single line of php code to your comments.php. It will only affect that theme.

    I posted in my blog a short article on the solution to the worpdress comment sort.

    This works fine and all, but the numbers displayed next to the comments don’t change. Any idea how to change the number as well as the order of the comments?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I want to change the order of the comments’ is closed to new replies.