Site logo

[Resolved] Post Updated Date – Not Showing Up

Home Forums Support [Resolved] Post Updated Date – Not Showing Up

Home Forums Support Post Updated Date – Not Showing Up

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2407927
    Abdul

    I have added this code in the Code Snippets

    add_filter( 'generate_post_date_show_updated_only', '__return_true' );

    And this one, too, in the CSS

    /*New Code for Updated Date*/
    
    .posted-on .updated {
        display: inline-block;
    }
    
    .posted-on .updated + .entry-date {
        display: none;
    }
    
    .posted-on .updated:before {
        content: "Last Updated on ";
        font-weight: bold;
    }
    
    .entry-header .entry-meta > *:not(:last-child):after {
        content: " | ";
    }
    /*End Code*/

    But still it is not working

    #2408011
    David
    Staff
    Customer Support

    Hi there,

    your site is using WP Show Posts and a Header Element so:

    1. Add this PHP Snippet to change the Post date in Theme archives and the page hero:

    
    add_filter( 'generate_post_date_show_updated_only', '__return_true' );
    
    function post_modified_date() {
        return get_the_modified_date();
    }
    add_shortcode( 'modified_date', 'post_modified_date' );

    2. Add this CSS to change the front page dates:

    .wp-show-posts-updated {
        display: block !important;
    }
    .wp-show-posts-entry-date {
        display: none;
    }
    #2409800
    Abdul

    home page is working fine now, but when I open the article, it still shows the original publish date.

    not showing the updated current date.

    #2409884
    David
    Staff
    Customer Support

    Can i see a link to a post ?

    #2410177
    Abdul

    Added the link in the private area.

    same article on the homepage shows as November 4, 2022

    #2410224
    David
    Staff
    Customer Support

    Ok

    1. In Appearance > Elements edit the Single Post Hero.
    2. Select the Post Date and in the Block Toolbar data options change the Date type to Updated

    #2410379
    Abdul

    Working now, Thanks David

    #2411061
    David
    Staff
    Customer Support

    Glad to hear that!

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