[Resolved] Remove Post Dates On Selected Posts Only

Home Forums Support [Resolved] Remove Post Dates On Selected Posts Only

Home Forums Support Remove Post Dates On Selected Posts Only

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #810092
    JOHN

    What is the correct way to remove posts dates only on a few posts?

    I am using the “marketer” theme library.
    I use mostly posts and a few pages on my site. A few of my posts I would like the date not to show.

    I have read in the forum of using CSS or using a filter.

    What would you recommend?

    #810198
    David
    Staff
    Customer Support

    Hi there,

    if you don’t want ( or don’t mind ) search engines not seeing the date then filter is the best route. Tom provides a filter here for posts that are within particular categories as an example:

    https://generatepress.com/forums/topic/disable-post-meta-based-on-category/#post-721411

    If you want to allow the search engine to see the date but not humans then CSS. Let me know.

    #810796
    JOHN

    How would I do it with CSS?

    Would this work?

    .entry-date {
    display: none;
    }

    I just want to hide the date on 3 posts.

    #810857
    Tom
    Lead Developer
    Lead Developer

    You would do this:

    .postid-10 .posted-on,
    .postid-20 .posted-on,
    .postid-30 .posted-on {
        display: none;
    }

    You just need to update numbers with the actual IDs of the posts.

    #810877
    JOHN

    Thank you. that works.

    #810882
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.