SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist Azam.net's Avatar
    Join Date
    Apr 2002
    Location
    UK
    Posts
    479
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question What do we need to edit please to remove the date from top of Wordpress blog posts?

    In our blog the date of the blog posts appears at the top of each blog post, next to the title (see here). This puts pressure on us to continually keep the blog updated and people think that blog posts are 'old' even though the ones from a year ago are usually as relevant today as they were in 2011.

    Just wish to call upon the Wordpress gurus out there: what do we need to edit to remove the date from the top and put it at the end of each blog post? Would be ideal if, even it was at the end, it wasn't so prominent.

    Thanks very much.
    Azam Marketing, Inc.
    Award-Winning Digital Marketing and Design Results Since 1997
    Click here to read acclaimed online marketing & design blog

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,938
    Mentioned
    214 Post(s)
    Tagged
    12 Thread(s)
    Hi,

    Assuming you have access to your theme's files, there are two places you're going to have to look:
    1. index.php. This is responsible for displaying a list of blog posts on the front page of your site.
    2. single.php. This is responsible for displaying a single blog post.
    Unfortunately, both of these files are likely to pull in a bunch of other files, depending on what is being displayed.

    Taking the standard "Twenty Eleven" theme as an example, in index.php it uses the function get_template_part()to load whichever template file has been used in the post.
    That means that it loads content.php, for posts using the standard template, content-gallery.php for posts using the gallery template, and so on ...
    So, to change the way that the date is displayed on the front page of a site using this theme, you would have to alter all of these template files accordingly.
    Inside the files, the date is displayed thus: <?php twentyeleven_posted_on(); ?>. I'm sure it'll be something similar or equally obvious in your theme.

    Single.php is less work. It just pulls in the file content-single.php.
    You would alter this in the same way.

    I hope that is understandable.

  3. #3
    Non-Member
    Join Date
    Sep 2012
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Even if the node for Wordprsss post date need be preserved inteh page, you can make it invisible by CSS, like:
    style="display: none;"

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    If you don't want dates on the entries then why not create pages rather than posts. When you create pages they will not have the date at the top.

    The other thing that you can do with evergreen posts is to edit old posts and change their date.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •