Code below works perfectly for topics individual list page but does not works for boards home page where multiple forums list .. i turned enabled this options -> Turn WordPress to this forum board
add_filter(‘wpforo_topic_list_args’, function ($args){
if(!empty($args)){
$forumIDs = array(1,2,8, 9);
if( in_array( $args[‘forumid’], $forumIDs) ){
$args[‘orderby’] = ‘type DESC,title ASC’;
$args[‘order’] = ”;
}
}
return $args;
});
any solution ? if yes please suggest
Hi @hgdev113,
Please let us know where this script coms from? I need to see the script description.
here is the script i copied from https://wpforo.com/community/how-to-and-troubleshooting-2/can-i-sort-topics-by-title-or-column-header/paged/2/ to sort the topics by title
It works perfectly on individual forum page like https://myforum.com/boards/forum1 but not works here https://myforum.com/boards/