Remove date and time on posts and pages

  • Author
    Posts
  • #1358666

    I need the code to remove the time and date from posts. It is not applicable to my site. Thanks for all of your help!!

    ( I apologize if this has already been asked.)

    The blog I need help with is gabriellepeck.com.

    #1358736

    Hi Gabrielle,

    You need the Custom Design upgrade to change the structure of your theme. Assuming you already have such upgrade, you can try adding this to the Appearance → Custom Design → CSS panel:

    .content date {
        display: none;
    }
    #1358739

    Thank you so much!

    #1358749

    hiweiss
    Member

    I tried this while in “Customize” and on the Home Page I still see the date. I’m not sure if this is because I’m only previewing the page prior to paying for Custom Design or because I’m looking at the Home Page.

    Thank you!

    #1358750

    Hi @hiweiss,

    As you didn’t mention the blog you need help with, I’m assuming it’s https://hweissassociates.wordpress.com/.

    CSS is theme specific, that’s why what Gabrielle used for her blog won’t work for your blog: You guys are using different themes.

    For your blog, try adding the following CSS to the Appearance → Custom Design → CSS panel:

    time.post-detail {
        display: none;
    }

    This will take care of your Home Page. To remove the date from your other pages as well, add this CSS instead:

    .post-detail, time.post-detail {
        display: none;
    }

    Remember, these changes will only be visible from your blog once you purchase the Custom Design upgrade. Happily, you can try them as much as you want before buying anything. See “I’m not sure if the Custom Design upgrade is for me. Can I try before I buy?” at http://en.support.wordpress.com/custom-design/

    #1358754

    hiweiss
    Member

    Thank you, this is incredibly helpful! Yes, that is the blog I was asking about. Another quick question. When I make that change by removing the date on the Home Page (I’m still in preview mode, so you can’t see this right now), what happens is there is extra vertical whitespace between the paragraph text and the horizontal bar below.

    Is there a way using css to shorten that vertical space so that there is not so much extra whitespace below the text from one post and the horizontal line beneath? So you know what I’m referring to, the text with about 1 1/2 inches of whitespace below is “recently serving as a Principal…” and then “micro level (tactics for a specific…”.

    Thanks again!

    #1358755

    Aha! I just noticed that the code I suggested previously will also hide the “Read more” link in your home page. That’s the reason why you have more whitespace now than you had before.

    This happens because the “Read more” link is also using the “post-detail” class, which I targeted to hide the date in your individual post pages.

    Try using this CSS instead:

    .single .post-detail, time.post-detail {
        display: none;
    }

    This code will restrict the changes to the “post-detail” class to the single pages, where it is not used for “Read more” links.

The topic ‘Remove date and time on posts and pages’ is closed to new replies.