[Support request] Show updated/published date with WP Shows Posts (Post lists) and on normal posts

Home Forums Support [Support request] Show updated/published date with WP Shows Posts (Post lists) and on normal posts

Home Forums Support Show updated/published date with WP Shows Posts (Post lists) and on normal posts

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1633710
    amarinos

    Hi @Tom and support team,

    we want to show the updated/published date on wpsp posts lists and on all posts pages. We achieved to show the dates on a posts lists page (see screenshot: https://drop.tdv.cloud/WXQCHb) with this css code:

    
    .wp-show-posts-updated {
        display: block;
    }
    .wp-show-posts-updated:before {
        content: "Updated on ";
    }
    
    .wp-show-posts-entry-date:before {
        content: "Published on ";
    }
    

    But on the posts page itself (see screenshot: https://drop.tdv.cloud/jUhF2h) updated/published dates are not shown. We need your help here πŸ™‚ … What code snippet or CSS is needed?

    love/health/happiness,
    best wishes, a.

    do not support #captivity!
    speak up #foranimals

    #1633735
    Elvin
    Staff
    Customer Support

    Hi there,

    You can show the updated date on a similar manner with the CSS provided on this documentation.
    https://docs.generatepress.com/article/show-the-updated-post-date/

    We simply changed the selectors. πŸ™‚

    A wise man once said:
    "Have you cleared your cache?"

    #1633751
    amarinos

    Hi @Elvin,

    thanks for helping us. I added the css from your link:

    
    .posted-on .updated {
        display: inline-block;
    }
    
    .posted-on .updated + .entry-date {
        display: none;
    }
    
    .posted-on .updated:before {
        content: "Last Updated ";
    }
    

    Now I see on the posts page this: https://drop.tdv.cloud/rHQFzB
    Great, but in here we want also the “Published on” date … What must be done now?

    love/health/happiness,
    best wishes, a.

    do not support #captivity!
    speak up #foranimals

    #1633776
    Elvin
    Staff
    Customer Support

    Add this CSS:

    .posted-on .published:before {
        content: "Published on ";
    }

    A wise man once said:
    "Have you cleared your cache?"

    #1633820
    amarinos

    I added the additional CSS – nothing changed. Only “Last updated: …” is shown …

    For our overview, here the complete CSS I added:

    
    .wp-show-posts-updated {
        display: block;
    }
    .wp-show-posts-updated:before {
        content: "Updated on ";
    }
    
    .wp-show-posts-entry-date:before {
        content: "Published on ";
    }
    
    .posted-on .updated {
        display: inline-block;
    }
    
    .posted-on .updated + .entry-date {
        display: none;
    }
    
    .posted-on .updated:before {
        content: "Last Updated ";
    }
    
    .posted-on .published:before {
        content: "Published on ";
    }
    

    love/health/happiness,
    best wishes, a.

    do not support #captivity!
    speak up #foranimals

    #1634575
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Any chance you can link us to the page?

    #1634656
    amarinos

    Hi @Tom,

    sure … Have a look in the private information field πŸ˜‰ …

    love/health/happiness,
    best wishes, a.

    do not support #captivity!
    speak up #foranimals

    #1634957
    Elvin
    Staff
    Customer Support

    Thank you for providing the information.

    You have this custom CSS that prevents the published date from displaying:

    .posted-on .updated + .entry-date {
        display: none;
    }

    I believe you can remove this if you want both the dates to show.

    Optional: You can add this in if you want the dates to display in one line.

    .posted-on time.entry-date.published {
        display: inline-block;
        margin: 0 10px;
    }

    A wise man once said:
    "Have you cleared your cache?"

    #1637258
    amarinos

    Hello @Elvin,

    worked! I have to learn a bit of CSS πŸ˜‰ …

    I added the optional CSS to display the dates in one line … Worked!

    But if only a “Published date” exists and no “updated date” it looks like this: https://drop.tdv.cloud/j6Uytf … Is it possible to get the “Published date” aligned with the body text to the left?

    love/health/happiness,
    best wishes, a.

    do not support #captivity!
    speak up #foranimals

    #1637600
    Elvin
    Staff
    Customer Support

    Let’s change this:

    .posted-on time.entry-date.published {
        display: inline-block;
        margin: 0 10px;
    }

    To this:

    .posted-on time.entry-date.published {
        display: inline-block;
    }

    And then add this:

    span.posted-on > *:first-child {
        margin-right: 10px;
    }

    A wise man once said:
    "Have you cleared your cache?"

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