Support » Fixing WordPress » Need Help!

Viewing 15 replies - 1 through 15 (of 32 total)
  • Look in your theme files for comments.php or comments-something.php
    (in the Default theme it’s in comments-popup.php) for something like

    <?php comment_date('M jS, Y'); ?> at <?php comment_time(); ?>

    and edit it out.

    <?php // Do not delete these lines
    if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    	die ('Please do not load this page directly. Thanks!');
    if ( post_password_required() ) { ?>
    	<p class="center"><?php _e("This post is password protected. Enter the password to view comments."); ?></p>
    <?php
    	return;
    } ?>
    
    <!-- You can start editing here -->
    
    <div id="comments-list">
    
    <?php if ( have_comments() ) : ?>
    	<h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h3>
    
    	<ol>
    	<?php wp_list_comments(); ?>
    	</ol>
    
     <?php else : // this is displayed if there are no comments so far ?>
    
    	<?php if ('open' == $post->comment_status) : ?>
    		<!-- If comments are open, but there are no comments. -->
    
    	 <?php else : // comments are closed ?>
    		<!-- If comments are closed. -->
    		<p class="nocomments">Comments are closed.</p>
    
    	<?php endif; ?>
    <?php endif; ?>
    
    <?php if ('open' == $post->comment_status) : ?>
    
    <div id="respond">
    
    <h3><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h3>
    
    <div class="cancel-comment-reply">
    	<small><?php cancel_comment_reply_link(); ?></small>
    </div>
    
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
    <?php else : ?>
    
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    
    <?php if ( $user_ID ) : ?>
    
    <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a></p>
    
    <?php else : ?>
    
    <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
    <label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
    
    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
    <label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
    
    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url"><small>Website</small></label></p>
    
    <?php endif; ?>
    
    <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
    
    <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
    
    <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
    <?php comment_id_fields(); ?>
    </p>
    <?php do_action('comment_form', $post->ID); ?>
    
    </form>
    
    <?php endif; // If registration required and not logged in ?>
    </div>
    
    <?php endif; // if you delete this the sky will fall on your head ?>

    This is all that’s in my comments.php file..I can’t find anything to edit.

    In the “unsleepable” theme that you have, I see this part in comments.php (I downloaded both the original and the widget-ready version):

    on <a href="#comment-<?php comment_ID() ?>" title="<?php if (function_exists('time_since')) { $comment_datetime = strtotime($comment->comment_date); echo time_since($comment_datetime) ?> ago<?php } else { ?>Permalink to Comment<?php } ?>"><?php comment_date('M jS, Y') ?></a>

    If you are using a different version, could you point me out to the download link?

    I’m using Unsleepable 3.0 by Ben Gray and I have no touched the comments.php file before.

    No, I do not see that line of code though buddha.

    esmi

    (@esmi)

    Forum Moderator

    <?php wp_list_comments(); ?> is generating the comment list code.

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

    Okay that’s one thing I’m not good with. Could one of you give me the line of php wp_list_comments without it displaying the date? Would be hella appreciated.

    If you check the link that esmi provided, there is a reference to functions.php of the theme.

    “You will need to define your custom callback function in your theme’s functions.php file.”

    Check in there, and edit out the reference to the date and time. In the codex example:

    get_comment_date(), get_comment_time()

    In the Default theme, there is the same call for wp_list_comments in comments.php, but that callback function is in comments-popup.php, so, if it’s not in functions.php, look for another file comments-whatever.php, as mentioned earlier.

    I forgot to mention that Unsleepable 3.0 cannot be downloaded. On the author’s site it gives a 404 not found. I tried searching for it on Google, but all links to the last version of this theme are broken.

    I guess I got an exclusive huh buddha =]

    But how do you think the site looks? been doing alot of work on it.

    buddha I actually have the default unsleepable 3.0 theme on my computer if you want me to upload it for you. I always keep a copy for backup =]

    Edit: I dont have a functions.php file in my unsleepable theme folder.

    Yes, upload a zipped file so I can look at it to see if I can locate the code. I’ll check back shortly for the url.

    Hmmm… you are right, there is no other reference than the call to wp_list_comments…

    Let me search for info on how to make changes, unless someone else jumps in with the know-how.

    Alright appreciate it but don’t forget about me!

    OK, it looks like you can do it by adding a callback to wp_list_comments, and add that callback to functions.php (which is what the link esmi gave earlier, also mentions)

    Read this for reference as well
    http://www.kimwoodbridge.com/how-to-remove-says-from-wordpress-27-threaded-comments/

    WordPress wp_list_comments()

    So use instead
    <?php wp_list_comments(‘callback=mytheme_comment’); ?>

    and then add the mytheme_comment function into functions.php, following the examples given, and skip the time and date part.

    Hope this helps!

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘Need Help!’ is closed to new replies.