Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpForo community!

Merry Christmas and Happy Holidays! 🎄

[Solved] filter to add sortby topic title on boards home page

4 Posts
2 Users
0 Reactions
764 Views
Posts: 2
Topic starter
(@hgdev113)
New Member
Joined: 2 years ago

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


3 Replies
Robert
Posts: 10600
Admin
(@robert)
Support Team
Joined: 10 years ago

Hi @hgdev113,

Please let us know where this script coms from? I need to see the script description.


Posts: 2
Topic starter
(@hgdev113)
New Member
Joined: 2 years ago

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/


1 Reply
Robert
Admin
(@robert)
Joined: 10 years ago

Support Team
Posts: 10600

@hgdev113 

The URLs to your website don't work. In any case this cannot work on the home page because the home page is not a forum page. The home page is for forum list not for topic list. It displays topics from multiple forums so it cannot be sorted by individual forum id.