Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How to Remove the Date from Wordpress Comments

  1. #1
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,034
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts

    How to Remove the Date from Wordpress Comments

    As of the March update, Google is now using the comment dates to date articles:

    Improvements in date detection for blog/forum pages. [launch codename "fibyen", project codename "Dates"] This change improves the algorithm that determines dates for blog and forum pages.
    Unfortunately, they are using the oldest comment date, so even currently active posts appear to be out of date.

    This is an annoyance for those of us who have already removed all date features from our posts and pages by editing our themes.

    Unfortunately, you cannot remove dates from your Wordpress comments by editing your theme -- you have to hack into Wordpress itself.

    The file to edit is wp-includes/comment-template.php. Edit line 1365 to replace this:
    Code:
    printf( __('%1$s at %2$s'), get_comment_date(),  get_comment_time())  ?></a><?php  edit_comment_link(__('(Edit)'),'&nbsp;&nbsp;','' );
    With this:
    Code:
    printf( __('%1$s at %2$s')) ?></a><?php edit_comment_link(__('(Edit)'),'&nbsp;&nbsp;','' );
    Remember that you will have to replace this hack after every Wordpress update.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  2. Thanked by:

    Doc (2 May, 2012), Loko (4 April, 2012), TopDogger (4 April, 2012)

  3. #2
    TopDogger's Avatar
    TopDogger is offline Über Hund
    Join Date
    Jan 2009
    Location
    Hellfire, AZ
    Posts
    3,177
    Thanks
    350
    Thanked 929 Times in 711 Posts
    The kids at Google appear to be getting more and more removed from reality. If they start using comment dates to date freshness, this will encourage site owners to approve the vast amounts of spam that WordPress sites receive. This does not improve the quality of posts. It makes it worse.

    I wonder if the removal of dates is going to hurt rankings in the long run due to the freshness issue. Some of my blogs uses post dates, but others do not. I have had to turn comments off for most blogs because they are getting deluged with spam.
    "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- Benjamin Franklin


  4. #3
    iowadawg's Avatar
    iowadawg is online now Free Cell Champion
    Join Date
    May 2010
    Location
    Not in Texas
    Posts
    2,220
    Blog Entries
    4
    Thanks
    177
    Thanked 369 Times in 318 Posts
    I never removed any date function from my blogs.
    Though I have seen more and more big blogs (news sites, newspaper sites, etc) drop the dates completely.

    Why I have no clue.

    Spam for comments...I like akismet.
    Does the job for me.
    Approves maybe 1 in 200 or 1 in 300 for not spam!

    A thought!
    Maybe wordpress will remove the date function in next update?

  5. #4
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,034
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    I think that Old Post Promoter is responsible for the increase in rankings from which many of my sites benefited last month.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  6. #5
    iowadawg's Avatar
    iowadawg is online now Free Cell Champion
    Join Date
    May 2010
    Location
    Not in Texas
    Posts
    2,220
    Blog Entries
    4
    Thanks
    177
    Thanked 369 Times in 318 Posts
    Got to say, for wodpress goodies, this forum is the best!

    Thanks for that one Will....

    Downloaded and will put on a blog to see what develops.

  7. #6
    Top Net is offline Net Builder
    Join Date
    Jun 2012
    Posts
    120
    Thanks
    0
    Thanked 1 Time in 1 Post
    To remove date from WP comment, you can edit in your CSS script code, go to edit comment, find the date format, and delete the date format inside.

  8. #7
    TopDogger's Avatar
    TopDogger is offline Über Hund
    Join Date
    Jan 2009
    Location
    Hellfire, AZ
    Posts
    3,177
    Thanks
    350
    Thanked 929 Times in 711 Posts
    Quote Originally Posted by Top Net View Post
    To remove date from WP comment, you can edit in your CSS script code, go to edit comment, find the date format, and delete the date format inside.
    You cannot remove the date from WordPress code by editing the style sheet. At best, you can use CSS to hide the date (display:none), but that does not hide it from spiders. The idea with this thread is to remove the date entirely so that spiders cannot use it.

    I have not tried this, but the following Warrior Forum thread says that you can replace comments.php in newer themes with the comments.php script from the old Classic theme and the date in that script is editable.

    http://www.warriorforum.com/main-int...-comments.html

    I did look at the script from the old Classic theme and it does have a comment_date() function call that can be removed. If the script is compatible, it should work.
    Last edited by TopDogger; 24 July, 2012 at 22:41 PM.
    "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- Benjamin Franklin


  9. #8
    Andy101's Avatar
    Andy101 is offline Code Otaku
    Join Date
    Aug 2009
    Location
    Kanazawa
    Posts
    1,367
    Thanks
    181
    Thanked 313 Times in 240 Posts
    Wordpress themes can contain as few or as many of the expected templates. If one is not found in a theme, then the script will revert back to the standard template.

    And in the Wordpress engine, there are "hooks" that may be intercepted by plugin code so as to replace the standard content, for sure there will be a hook associated with comments.

    So the way forward is to do this date removal inside a plugin since the engine (core) code will be replaced at each update. Or the theme that you use has a comments template that takes care of this date issue.

  10. Thanked by:

    robjones (24 July, 2012), Will.Spencer (25 July, 2012)

  11. #9
    TopDogger's Avatar
    TopDogger is offline Über Hund
    Join Date
    Jan 2009
    Location
    Hellfire, AZ
    Posts
    3,177
    Thanks
    350
    Thanked 929 Times in 711 Posts
    A plugin or hook added to the functions.php file would have to be used with the TwentyTen and TwentyEleven themes. There is a comments.php file, but no date function that can be removed, as is the case with the old Classic theme.

    I agree that it is never a good idea to edit core code if it can be avoided.
    "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- Benjamin Franklin


  12. #10
    TopDogger's Avatar
    TopDogger is offline Über Hund
    Join Date
    Jan 2009
    Location
    Hellfire, AZ
    Posts
    3,177
    Thanks
    350
    Thanked 929 Times in 711 Posts
    There appears to be a compelling reason to remove the dates from blog posts and comments. I'm seeing a noticeable drop-off in Google traffic for older blog posts on sites that use dates on the pages, but an increase in traffic on sites that do not use posting dates.

    This could be an anomaly, but it looks like Google's Freshness Updates could be eliminating older posts from search results, especially if the posts do not have very many backlinks.
    "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- Benjamin Franklin


Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •