ec2 aws

Last Updated on March 29, 2023 by mishou

I. Amazon Elastic Compute Cloud (Amazon EC2)

Application and OS Images (Amazon Machine Image)

Debian 5.10.162-1 (2023-01-21), Bitnami 6.1.1-53

II. Selecting the theme


sample theme

III. Ordering posts by modified tate and adding the last updated date to the post

See: How to Order Posts by Modified Date in WordPress

Add the following code showed below to the theme’s functions.php.

function themesdna_sort_homepage_posts_by_modified_date( $query ) {
    if( $query->is_main_query() && ! is_admin() && $query->is_home() ) {
        $query->set( 'orderby', 'modified' );
        $query->set( 'order', 'DESC' );
add_action( 'pre_get_posts', 'themesdna_sort_homepage_posts_by_modified_date' );

You can edit the functions.php at Appearance>Theme File Editor:

themes.php on Theme File Editor

If you encounter a fatal error and cannot access WordPress Admin Dashboard, you can connect to the instance and edit functions.php at /opt/bitnami/wordpress/wp-content/themes/blogus/functions.php.

You can learn more about how to troubleshoot issues here:

Troubleshoot WordPress Issues


To be continued.

By mishou

Leave a Reply

Your email address will not be published. Required fields are marked *