• I accidently deleted a section from the comments.php area. I wanted to delete the date and time from comments posted, but I obviously didn’t do that right (lol), and now my comments are gone. I’ve included a section of my comments.php, and indicated the area that I deleted. Think anyone can help? My blog is https://www.hungryfoodies.com. Thank you in advance. ??

    Here’s what I did…

    `
    <?php } ?>

    <?php if ( ! empty( $comments_by_type[‘pings’] ) ) { ?>
    <div id=”pinglist-container” class=”comment-tab”>

    <ol class=”pinglist”>
    <?php // not calling wp_list_comments twice, as it breaks pagination
    $pings = $comments_by_type[‘pings’];
    foreach ($pings as $comment) { ?>
    <li class=”ping”>

    >>>>>>>>>>>>>>> There was once writing here. ?? Now my comments don’t show on my blog. Can you help? <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

    <!–/.pinglist–>

    </div>
    <?php } ?>

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’d suggest reinstalling the theme.

    Do be aware that if you have modified any theme files, those changes will be lost when you reinstall. But you should not modify theme fiels directly anyway – use a child theme to make those kinds of changes.

    Here you go. If this doesn’t fix it then you’ll need to reinstall the theme. And, as @wpyogi said, if you’re going to modify theme files, you need to use a child theme.

    <div class="ping-link"><?php comment_author_link($comment); ?></div>
         <div class="ping-meta"><?php comment_date( get_option( 'date_format' ), $comment ); ?></div>
         <div class="ping-content"><?php comment_text($comment); ?></div>
       </li>
    <?php } ?>
    Thread Starter Hungryfoodies

    (@hungryfoodies)

    Great! Thank you so much! I will do that from now on. I really appreciate all of you, and your help. ??

    Thread Starter Hungryfoodies

    (@hungryfoodies)

    @bdbrown It worked! Yayyyyy! Thank you so much.

    You’re welcome. If you don’t need any further assistance here please mark the topic as resolved. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Accidently deleted comments from blog’ is closed to new replies.