Skip to main content
All CollectionsTroubleshooting and FAQsFrequently Asked QuestionsBlog Module
How to Change the Default Sorting Order of Posts in the Blog Module
How to Change the Default Sorting Order of Posts in the Blog Module

Learn how to change the post sorting order using the Blog module to ensure the display order that best suits your content strategy

Updated over 3 months ago

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:

  1. Go to Appearance β†’ Theme File Editor

  2. Open the Blog.php file from your Child theme folder

  3. Search this piece of PHP code:

    $args['cat'] = implode( ',', self::filter_include_categories( $include_categories ) );
    $args['paged'] = $et_paged;

    Divi - Customize the Blog Module code and change the default display order

  4. Add this PHP code right after it:

    $args['orderby'] = 'title';
    $args['order'] = 'asc';

    Divi - Customize the Blog Module code - Change the default display order

  5. Save your changes.

The Posts will not be displayed in Ascending order based on their titles.

Did this answer your question?