[Resolved] remove publish date onsite – I looked at a few threads recently already

Home Forums Support [Resolved] remove publish date onsite – I looked at a few threads recently already

Home Forums Support remove publish date onsite – I looked at a few threads recently already

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1536028
    Mary

    Hi,

    I was to remove the publish date on my blog post and show only the update date. I found your article on how to do it in CSS but it didn’t quite work.

    This is the code I was supposed to add:

    add_filter( ‘generate_post_date_show_updated_only’, ‘__return_true’ );

    Right now, this is my CSS look like:

    .posted-on .updated {
    display: inline-block;
    margin-right: 15px;
    }
    .posted-on .updated:before {
    content: “LAST UPDATED: “;
    }

    .posted-on .published:before {
    content: “PUBLISHED ON: “;
    }

    ———-

    I tried removing this part:

    }
    .posted-on .updated:before {
    content: “LAST UPDATED: “;
    }

    .posted-on .published:before {
    content: “PUBLISHED ON: “;
    }

    to replace with the code earlier but it only removed the words “LAST UPDATED and PUBLISHED ON”. Both dates are still showing. Here’s a screenshot: https://prnt.sc/vljmxq

    Thank you!

    Mary

    #1536448
    David
    Staff
    Customer Support

    Hi there,

    can you provide a link to your site where i can see the issue?

    #1537304
    Mary

    Hi David,

    Sure, I added it on the private information form. I am back to my original CSS and didn’t add the new one yet:

    .posted-on .updated {
    display: inline-block;
    margin-right: 15px;
    }
    .posted-on .updated:before {
    content: “LAST UPDATED: “;
    }

    .posted-on .published:before {
    content: “PUBLISHED ON: “;
    }

    .entry-content ul {
    margin-left: 3em !important;
    }


    @media
    (min-width: 769px) {
    .navigation-search.nav-search-active {
    left: 0%;
    width: auto;
    }
    }

    #1537435
    David
    Staff
    Customer Support

    This code is PHP:

    add_filter( 'generate_post_date_show_updated_only', '__return_true' );

    Remove it from your CSS, and follow this article that explains how to add it:

    https://docs.generatepress.com/article/adding-php/

    #1537503
    Mary

    Hi David,

    Thanks for the help, I also found another solution in CSS if anyone in the future read this thread:

    .entry-meta .entry-date.published {
    display: none;
    }

    Or you can try the below CSS codes.

    .entry-meta {
    display: none;
    }

    #1537511
    David
    Staff
    Customer Support

    Glad to hear that !

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