How to Make Automatic.css Grid Classes...
Learn how to make Automatic.css grid classes compatible with Bricks Builder. If you...

WPCodeBox
976
This code snippet allows you to display random posts on your WordPress homepage instead of the default reverse chronological order, helping to enhance content discovery.
<?php
add_action( 'pre_get_posts', function( $query ) {
if ( $query->is_main_query() && is_home() ) {
$query->set( 'orderby', 'rand' );
}
});





