Please Help Me With Very Simple PHP Fix

Discussion in 'PHP' started by spycraft, Feb 10, 2011.

  1. #1
    Hello all,

    I currently have this code on my WP blog that uses the Twenty Ten theme:

    		<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
    			<?php
    				/* translators: 1: date, 2: time */
    				printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );
    			?>
    		</div><!-- .comment-meta .commentmetadata -->
    Code (markup):
    And it displays a link that reads "Date, Time" and another link that reads "Edit".

    Can someone please tell me how to remove the first link completely and just keep the "edit" link?

    It must be really simple but I've tried a bunch of stuff that result into errors.

    Thanks in advance!
     
    spycraft, Feb 10, 2011 IP
  2. hogan_h

    hogan_h Peon

    Messages:
    199
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #2
    No guarantee, but try this:
    
    <div class="comment-meta commentmetadata">
    	<?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?>
    </div><!-- .comment-meta .commentmetadata -->
    
    Code (markup):
     
    hogan_h, Feb 10, 2011 IP
    spycraft likes this.
  3. swashata

    swashata Member

    Messages:
    86
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #3
    Yes, that is the code. It will work for sure...
     
    swashata, Feb 11, 2011 IP
  4. spycraft

    spycraft Member

    Messages:
    795
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    35
    #4
    Well, it didn't work at first, but I figured it out :)

    Thank you!
     
    spycraft, Feb 15, 2011 IP