Title: Article order
Last modified: January 11, 2020

---

# Article order

 *  Resolved [moonyell](https://wordpress.org/support/users/moonyell/)
 * (@moonyell)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/article-order-2/)
 * Hi,
    My question is where I can re-arrange the order of articles. It looks the
   default order is the earliest-published articles show first always, but I want
   show the latest article but I have no idea where I can change the setting.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [BasePress](https://wordpress.org/support/users/codesavory/)
 * (@codesavory)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/article-order-2/#post-12314978)
 * Hi [@moonyell](https://wordpress.org/support/users/moonyell/),
 * the articles are displayed by date in ascending order.
    You can change that by
   adding the following hooks to your functions.php:
 *     ```
       //Change post order for a single section page
       add_action( 'pre_get_posts', function( $query ){
       	global $basepress_utils;
   
       	if( $basepress_utils->is_section){
       		$query->set( 'order', 'DESC' );
       	}
       }, 9999 );
   
       //Change post order for multiple sections page
       add_filter( 'basepress_multi_section_query', function( $args ){
       	$args['order'] = 'DESC';
       	return $args;
       } );
       ```
   
 * In case you need the Premium version allows you to reorder the results manually
   with drag & drop.
 * Thanks
 *  Thread Starter [moonyell](https://wordpress.org/support/users/moonyell/)
 * (@moonyell)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/article-order-2/#post-12318079)
 * Hi,
 * The solution works. Thank you very much.
 * Yet, when I copy the codes as provided into dreamweaver, it shows red with several
   lines which usually means there are some error of syntax or else. Since I do 
   not understand PHP, I could not determine what kind erros. But as I said, article
   order are re-arranged as expected.
    Great job!
 *  Plugin Author [BasePress](https://wordpress.org/support/users/codesavory/)
 * (@codesavory)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/article-order-2/#post-12318685)
 * Hi there,
 * I am not sure why Dreamweaver would mark any of that code in red but I can reassure
   you that there are no errors.
 * Thanks
 *  Thread Starter [moonyell](https://wordpress.org/support/users/moonyell/)
 * (@moonyell)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/article-order-2/#post-12319767)
 * Hello,
 * Thanks for your quick response. My question being solved.
    Good job!!!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Article order’ is closed to new replies.

 * ![](https://ps.w.org/basepress/assets/icon-256x256.gif?rev=2817400)
 * [Knowledge Base documentation & wiki plugin - BasePress Docs](https://wordpress.org/plugins/basepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/basepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/basepress/)
 * [Active Topics](https://wordpress.org/support/plugin/basepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/basepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/basepress/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [moonyell](https://wordpress.org/support/users/moonyell/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/article-order-2/#post-12319767)
 * Status: resolved