Customizing the sorting order of your blog posts can enhance user experience and help highlight your most important content.
In this article, we will guide you through the process of changing the default sorting order of posts in Divi's Blog Module.
Note: Before continuing with this article, ensure the following:
A Child theme for Divi is installed and active
The Blog.php file has been copied from the Parent theme to the child theme.
Go to Appearance β Theme File Editor
Open the Blog.php file from your Child theme folder
Search this piece of PHP code:
$args['cat'] = implode( ',', self::filter_include_categories( $include_categories ) );
$args['paged'] = $et_paged;Add this PHP code right after it:
$args['orderby'] = 'title';
$args['order'] = 'asc';Save your changes.
The Posts will not be displayed in Ascending order based on their titles.