Support » Fixing WordPress » Removing The Time Element Of Your Posts?

  • I just installed a wordpress blog as a subdomain of my larger site, and one of the parts I’d like to remove is the time element of posting. If I don’t get around to a new blog post for awhile, but just concentrate on the rest of my site, I don’t want my site visitors to know it.

    Is there a way with wordpress to remove the day/month for all your posts?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • you have to edit the theme files; index.php, single.php, archive.php, etc.
    and find the lines of code with the_time(' .... ') and/or the_date(' ... ') and remove them (without violating the php and html structure).

    if in doubt, paste the code of these files into a http://wordpress.pastebin.com/ each and post the link(s) to them here.
    someone might have a lok at it, and suggest what to delete.

    This is a function of the theme.

    For instance, in my theme, the archive.php file has code that looks like

    <small><?php the_time('l, F jS, Y') ?></small>

    To delete the time stamp in your list of posts, simply delete that code from archive.php.

    the_time is a Template Tag and there are other tags that might be used to generate the date. If you look at the HTML code surrounding the date, you should be able to match it up with the PHP code in the theme files. [See this info on the template hierarchy for clues as to which files might be involved.]

    Note that the blog post may be displayed in several different contexts on the blog (in an archive, as a single post, on the front page of the blog), so there may be several different files in the theme that you’ll need to adjust to delete the date.

    Full disclosure: I run a few blogs where I don’t make frequent updates. I’ve come to terms with the fact that the “freshness” of the site is visible — and don’t mind the visitors seeing that things aren’t so new. If you use things like “archives by month” the visitors will have other ways to see how often you update the blog. If a frequency of once a week or a month or just “when there’s something to say” is what “works” for you, then I wouldn’t worry about making the post dates visible (though, of course, they can be deemphasized).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Removing The Time Element Of Your Posts?’ is closed to new replies.