WordPress.org

Ready to get started?Download WordPress

Forums

Comment Replies Without Having To Use wp_list_comments( $args ); (10 posts)

  1. alanchrishughes
    Member
    Posted 2 years ago #

    Is it possible to create comment replies without having to use wp_list_comments( $args ); ?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    No. Why?

  3. alanchrishughes
    Member
    Posted 2 years ago #

    There is seriously nothing?

  4. alanchrishughes
    Member
    Posted 2 years ago #

    I know there has to be something out there for this...

  5. alanchrishughes
    Member
    Posted 2 years ago #

    If you really don't know why someone would want to customize their comments, sometimes people like to design things to fit their website, maybe they want to remove the date a comment was posted, maybe they want to add a thick dotted blue border around each comment, maybe an infinite number of other things they want to do.

  6. You can customize your comments without changing that.

    It's called CSS :) That's how we all do it, and it works fine.

  7. alanchrishughes
    Member
    Posted 2 years ago #

    Yeah, you can do some stuff with CSS, but you have to have access to it to remove or add classes, and sometimes you want to do more than just play with the CSS.

    Is it all just lost in the core now or some php coding somewhere?

  8. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    you can also customize comments (html, css classes and all) with the callback functions of wp_list_comments()

    http://codex.wordpress.org/Function_Reference/wp_list_comments

    as it is done in Twenty Eleven for instance.

    Is it all just lost in the core now or some php coding somewhere?

    the code that is used without a custom callback, is in /wp-includes/comment-template.php from line 1329++, starting with function start_el(&$output, $comment, $depth, $args) {

  9. alanchrishughes
    Member
    Posted 2 years ago #

    So there is no simple way to do it? Like my entire comments.php file is literally just

    <?php if ($comments) : ?>
    <?php foreach ($comments as $comment) : ?>
    
    <div class="commenttext">
    <div class="CommentAuthorMeta"><?php comment_author_link() ?> - <?php comment_date('l, F jS, Y'); ?> - <?php comment_time(); ?></div>
    <div class="CommentText"><?php comment_text() ?></div>
    </div>	
    
    <?php endforeach; ?>
    
    <?php else : ?>
    <?php endif; ?>
    
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    
    <div class="CommentInfoTitles">Your Name:</div>
    <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" class="CommentInfoField" />
    
    <div class="CommentInfoTitles">Your Email:</div>
    <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" class="CommentInfoField" />
    
    <div class="CommentInfoTitles">Your Comments:</div>
    <textarea name="comment" id="comment" class="CommentField"></textarea>
    
    <input name="submit" type="submit" id="submit" value="Submit" />
    <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    
    </form>

    And that gives you complete control of everything that way.

  10. alanchrishughes
    Member
    Posted 2 years ago #

    I have zero grasp of php or any programming languages, so if that is the only way to use the reply feature, I am sol.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.