Title: orbitgadget's Replies | WordPress.org

---

# orbitgadget

  [  ](https://wordpress.org/support/users/orbitgadget/)

 *   [Profile](https://wordpress.org/support/users/orbitgadget/)
 *   [Topics Started](https://wordpress.org/support/users/orbitgadget/topics/)
 *   [Replies Created](https://wordpress.org/support/users/orbitgadget/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/orbitgadget/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/orbitgadget/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/orbitgadget/engagements/)
 *   [Favorites](https://wordpress.org/support/users/orbitgadget/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Last Modified Info] Add Published date AND Updated date?](https://wordpress.org/support/topic/add-published-date-and-updated-date/)
 *  [orbitgadget](https://wordpress.org/support/users/orbitgadget/)
 * (@orbitgadget)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/add-published-date-and-updated-date/#post-13397566)
 * Hey Keith, I have the ready-made code for Astra users. I would love to present
   it here.
 * //Example//
 * Before- “September 13, 2020 / By OrbitGadget”
    After- “Last Updated on September
   13, 2020, By OrbitGadget”
 * The code is :
 * function your_prefix_post_date( $output ) {
    $output = ”; $format = apply_filters(‘
   astra_post_date_format’, ” ); $modified_date = esc_html( get_the_modified_date(
   $format ) ); $updatetxt = “Last Updated on”; $postedtxt = “Posted on”; $u_time
   = get_the_time(‘U’); $u_modified_time = get_the_modified_time(‘U’); $modified_on
   = sprintf( esc_html( ‘%s’, ‘%s’), $modified_date );
 *  if ($u_modified_time >= $u_time + 86400) {
    $output .= ”; $output .= ‘ ‘ . $
   updatetxt . ”; $output .= ‘ ‘ . $modified_on . ”; $output .= ”; return $output;}
 *  else {
 *  $output .= ”;
    $output .= ‘ ‘ . $postedtxt . ”; $output .= ‘ ‘ . $modified_on.”;
   $output .= ”; return $output; } } add_filter( ‘astra_post_date’, ‘your_prefix_post_date’);
   add_filter( ‘astra_post_meta_separator’, ‘__return_false’ );
 * Now for the implementation of the above code just paste it in the functions.php
   if you are using a child theme. If you are not using a child theme you can use
   the code snippet plugin and add the above snippet.

Viewing 1 replies (of 1 total)