Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #220732

    Hey guys,

    I just found this thread: Change meta info of frontpage blog

    Unfortunately though I have no clue how this would apply to my current situation. I would like the blog to indicate when a post has been last updated instead of when it was first published.

    Basically I want it to be like this.

    Thanks in advance for your help!

    • This topic was modified 10 years, 10 months ago by Trystan.
    #220781

    Hi Felix!

    Please edit config-templatebuilder > avia-shortcodes > postslider.php, find this code on line 366:

    $markup = avia_markup_helper(array('context' => 'entry_time','echo'=>false));
    						$output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>";

    Replace it with:

    $markup = avia_markup_helper(array('context' => 'entry_time','echo'=>false));
    						$output .= "<time class='slide-meta-time updated' $markup>" .get_the_modified_time(get_option('date_format'), $the_id)."</time>";

    Cheers!
    Ismael

    #220783

    Hi,

    Can you post the link to your blog please (where you’d like to make this change)?

    Regards,
    Josue

    #220847
    This reply has been marked as private.
    #220848

    @Ismael: thanks, that makes a lot of sense, but unfortunately nothing changed :-/

    #221102

    Hi,

    Open /includes/loop-index.php and look for line 120:

    echo "<time class='date-container minor-meta updated' $markup>".get_the_time(get_option('date_format'))."</time>";
    

    Replace it by this:

    echo "<time class='date-container minor-meta updated' $markup>".get_the_modified_time(get_option('date_format'), $the_id)."</time>";
    

    Regards,
    Josue

    #221211

    Thanks, that worked!

    I have two questions left:

    1. Will this change persist Enfold updates?

    2. Now it seems like the post was created on that day. Is it possible to display “Last edited on” instead of just the date?

    #221299

    Hey!

    1. It won’t, if you use a Child theme however you can create a includes/loop-index.php (a copy of the original) in your Child theme directory and make the modification there.

    2. Replace the line for this:

    echo "<time class='date-container minor-meta updated' $markup> Last edited on ".get_the_modified_time(get_option('date_format'), $the_id)."</time>";
    

    Cheers!
    Josue

    #224200

    Thank you guys, it’s working now! However, after the update, the changes were lost :-/

    I’m not using a child theme, just Enfold. What’s the problem?

    #224207

    Hey!

    That was expected, every time you update all the theme files gets replaced with the new ones, therefore losing any customization. That’s why i recommended using a Child theme.

    However you can just re-do the change, now it’s on line 126.

    Best regards,
    Josue

    #727072

    Hi,

    does this also change the date of the blog post to the last edited date in google serps?

    #728272

    Hi,

    yes, it should work.

    Feel free to open a new ticket, if you need help with it.

    Best regards,
    Andy

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Change Blog date to "last updated" instead of "Date published"’ is closed to new replies.