Blog order by modified date

Hello,
I am using the Pro Theme and would like to sort blog posts globally—by default—based on the modification date. How can I do this? Is it possible to hook into cs_looper_set_args using a function?
Best regards,
Hannes

Hello Hannes,

Thanks for writing to us.

Regretfully, there is no option for that at the moment, as it would require custom development support. I would suggest contacting a developer who can assist you with your concerns or subscribing to One, where customization questions are answered. Please note that we do not provide custom development support, as it is outside our support scope.

Thanks for understanding

Thank you. What about this code snippet?

function pro_theme_native_archive_modified_sort( $query ) {
    // Ausschließliche Modifikation im Frontend und nur für die primäre Hauptabfrage
    if ( ! is_admin() && $query->is_main_query() ) {
        
        // Zielgerichteter Filter für die Standard-Beitrags-Archive
        if ( $query->is_home() || $query->is_category() || $query->is_tag() || $query->is_archive() ) {
            $query->set( 'orderby', 'modified' );
            $query->set( 'order', 'DESC' );
        }
    }
}
add_action( 'pre_get_posts', 'pro_theme_native_archive_modified_sort', 99 );