marko krstić

Collections

Archives

Change the default loop with function.php

/*==========================================
=            Reverce loop order            =
==========================================*/

function alter_order_of_posts( $query ) {
    if ( $query->is_main_query() ) {
        $query->set( 'order', 'ASC' );
        $query->set( 'orderby', 'menu_order' );
    }
}
add_action( 'pre_get_posts', 'alter_order_of_posts' );

Let's Connect

Feel free to reach out for collaborations or just a friendly hello ?
[email protected]
linkedininstagramdribbblefacebook-official