how to sort threads on home

Updated on Jul 14, 2016 in ForumEngine
4 on Jul 8, 2016

I try to sort the threads based on created date.

I failed although i installed plugin..

Please help me.

  • Liked by
1 on Jul 8, 2016

Hello Samllake,

You can be using function sort to customization

Go to includes/option.php find 

public function sort

public function sort( $data ,$args = array()){
$args = wp_parse_args( $args, array('orderby' => 'id', 'order' => 'ASC','hide_empty' => false ,'pad_counts' => true));
 $terms = get_terms( $this->taxonomy, $args );
foreach ($terms as $key => $term) {
 foreach ($data as $id => $parent) {
 if ( $term->term_id == $id && !empty($parent) )
 wp_update_term( $term->term_id, $this->taxonomy, array('parent' => $parent) );
update_option($this->order_option, $data);

then edit ‘orderby’, ‘order’, etc.

Hope it helps!

Customer Customer
on Jul 8, 2016
I go to wp-content/themes/forumengine or forumengine_
I change array('orderby' => 'id', 'order' => 'ASC',..  to orderby => 'date'....
Not affect…
Show more replies
  • Liked by
1 on Jul 13, 2016

Please check above image.


I don’t understaand sorting rule although i’d changed the source code as you wrote…


In addition, the updated date is out of order. i didn’t update above thread.. but updated is today… what’s wrong?


Mod Mod
on Jul 14, 2016


Hello there,

Greate work!

I think this problem came from the cache on your site. That maybe came from Caching Plugins, Browser Caching, Server Caching, etc.

After reloaded, your site was applied a new code.



Show more replies
  • Liked by
Loading more replies
Posting & Replying function will be deactivated from 3pm GMT+7 12th Sep.
Read More