Tagged: devin-docs
-
AuthorPosts
-
February 7, 2014 at 12:34 am #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.
February 7, 2014 at 6:53 am #220781Hi 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!
IsmaelFebruary 7, 2014 at 6:54 am #220783Hi,
Can you post the link to your blog please (where you’d like to make this change)?
Regards,
JosueFebruary 7, 2014 at 11:35 am #220847This reply has been marked as private.February 7, 2014 at 11:39 am #220848@Ismael: thanks, that makes a lot of sense, but unfortunately nothing changed :-/
February 8, 2014 at 4:23 am #221102Hi,
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,
JosueFebruary 8, 2014 at 12:41 pm #221211Thanks, 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?
February 9, 2014 at 6:14 am #221299Hey!
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!
JosueFebruary 14, 2014 at 10:59 pm #224200Thank 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?
February 14, 2014 at 11:32 pm #224207Hey!
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,
JosueDecember 21, 2016 at 3:23 pm #727072Hi,
does this also change the date of the blog post to the last edited date in google serps?
December 27, 2016 at 4:42 pm #728272Hi,
yes, it should work.
Feel free to open a new ticket, if you need help with it.
Best regards,
Andy -
AuthorPosts
- The topic ‘Change Blog date to "last updated" instead of "Date published"’ is closed to new replies.