Warning: count(): Parameter must be an array or an object that implements Countable in /home/chris493/public_html/wp-includes/media.php on line 1176
If the date is modified, show modified date in your Genesis Child theme posts – Christina Creative Design
Christina Creative Design

If the date is modified, show modified date in your Genesis Child theme posts

Warning: count(): Parameter must be an array or an object that implements Countable in /home/chris493/public_html/wp-includes/media.php on line 1176
alt="last-modified-date-genesis" width="800" layout="responsive" height="417">

This is a Google AMP optimized post. View the original: If the date is modified, show modified date in your Genesis Child theme posts. Google AMP is new technology and this post may contain tutorials with content you can't see unless you view the original, mobile page.

In the Short Code reference there are a couple shortcodes missing. The first one below is the shortcode for the modified date.

[post_modified_date]
[post_modified_time]

To indicate that the date was last updated on, I check to see if it was modified. This is so all the posts, even new ones, don’t show the text “Last updated on” before the date:

This modified from the one I use on this blog since I created what I call a fancy date that I show on larger viewports.

Please login to your account with StudioPress and go through their documentation, it’s pretty thorough, and will help you connect the dots and save you time and sweat.

Bonus! How to order your posts so that the modified post goes to the top:

@props: http://wordpress.stackexchange.com/a/49947/64742

This goes inside your functions.php file:


function christina_order_by_modified( $query ) {
    if ( $query->is_main_query() && ( $query->is_home() || $query->is_search() || $query->is_archive() )  ) {
        $query->set( 'orderby', 'modified' );
        $query->set( 'order', 'desc' );
    }
}
add_action( 'pre_get_posts', 'christina_order_by_modified' );

Post Navigation

Next:

Previous:


Warning: count(): Parameter must be an array or an object that implements Countable in /home/chris493/public_html/wp-includes/media.php on line 1176

Warning: count(): Parameter must be an array or an object that implements Countable in /home/chris493/public_html/wp-includes/media.php on line 1176

Warning: count(): Parameter must be an array or an object that implements Countable in /home/chris493/public_html/wp-includes/media.php on line 1176

Warning: count(): Parameter must be an array or an object that implements Countable in /home/chris493/public_html/wp-includes/media.php on line 1176

Warning: count(): Parameter must be an array or an object that implements Countable in /home/chris493/public_html/wp-includes/media.php on line 1176

Warning: count(): Parameter must be an array or an object that implements Countable in /home/chris493/public_html/wp-includes/media.php on line 1176

Warning: count(): Parameter must be an array or an object that implements Countable in /home/chris493/public_html/wp-includes/media.php on line 1176

Warning: count(): Parameter must be an array or an object that implements Countable in /home/chris493/public_html/wp-includes/media.php on line 1176

Warning: count(): Parameter must be an array or an object that implements Countable in /home/chris493/public_html/wp-includes/media.php on line 1176