Support » Fixing WordPress » How to hide date / time in individual post?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Erik

    (@southernutahautism)

    What theme are you using?

    If there’s a id/class assigned to just the date and time, you can easily hide it with display:none;.

    If you want it removed altogether, you’d probably want to create a child theme for whatever theme you’re using, and make a new styles.css and posts.php file for the child theme, and remove it from the template entirely.

    Hard to say without knowing exactly what you want accomplished and what theme you’re using.

    Hi Erik and thanks for your reply.

    I’m using brownline. For some posts that don’t change, I prefer not to show the date.

    Thanks.

    esmi

    (@esmi)

    Forum Moderator

    There are literally thousands of WordPress themes – which means that many people won’t be familiar with your particular theme. So a link to your site where people can see the theme would be more helpful.

    However, if you want to hide post dates on an ad hoc basis but don’t want to edit the theme’s stylesheet every time to add a new post id, an alternative solution would be to use a custom field which could then be used, via the relative template files, to apply a class around the post dates that you want to hide. That way,you would only need to make a single addition to your theme’s stylesheet but would have the option to hide or show post dates whenever you wanted via the Edit Post interface.

    Thanks esmi.

    I’ll give custom field a try.

    UPDATE:

    I found the Function Reference therefore, I added a span tag around the timestamp using a class=”timestamp-<?php the_ID(); ?>“. That way, I can modify each post’s CSS independently.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to hide date / time in individual post?’ is closed to new replies.