Elementor Archive Posts with Advanced Sorting

				
					add_action( 'pre_get_posts', function ( $query ) {
	// Only modify the query we want
	if ( ! $query->is_main_query() || ! $query->is_archive() ) {
		return;
	}

	// set posts per page
	$query->set( 'posts_per_page', 3 );
	// set order by
	$query->set( 'orderby', 'title' );
	// set order
	$query->set( 'order', 'DESC' );
} );
				
			
ZahidAramai-Circle-AboutUs1

Need Website Designer For Your Business?

I love to hear about your project, business, where you want to be and how I can help get you there.