Tagged: Evolv, Inspirations
- AuthorPosts
- February 17, 2022 at 9:04 am #47639CelesteGuest
Hello. I’d like my blog posts to appear in chronological order. I am wondering if there is a plugin that is responsible for making them appear in reverse chronological or if there is another setting I need to change.
My theme is Evolv.
Thank you in advance.
February 17, 2022 at 9:22 am #47657Brandon CKeymasterHi Celeste,
Thanks for reaching out and thanks for using Evolve theme with BoldGrid Post and Page Builder for WordPress!
I recreated your situation and solved the issue by installing and activating the Code Snippets plugin, then adding this PHP snippet:
//function to modify default WordPress query
function wpb_custom_query( $query ) {// Make sure we only modify the main query on the homepage
if( $query->is_main_query() && ! is_admin() && $query->is_home() ) {// Set parameters to modify the query
$query->set( 'orderby', 'date' );
$query->set( 'order', 'ASC' );
}
}// Hook our custom query function to the pre_get_posts
add_action( 'pre_get_posts', 'wpb_custom_query' );This should reverse the order of the post on your blog archive page.
I hope this helps. Please reach back out if you have any other questions for us.
- AuthorPosts
- The topic ‘How Can I the Change Order of Blog Posts in the Evolve Theme?’ is closed to new replies.