This one is actually pretty simple… We would suggest that you put the code in the forum theme template file spFunctions.php… Try this:
add_filter( 'sph_forumview_query', 'my_filter', 1, 2 );
function my_filter( $db, $forum ) {
if ( $forum->forumId == XX ) {
$db->orderby = 'topic_id ASC';
}
return $db;
}
Basically copy and paste this exactly as it is. Of course you can change the function name if desired!
Firstly replace the XX with the ID of the forum you wish to change the sort order of. You can find that in the admin Manage Forums listing.
Now the normal, default order by instruction is:
ORDER BY topic_pinned DESC, spf_sftopics.post_id DESC
To change this to order by when the topic was created starting with the oldest then use the code given. If you want the newest first then change to
If you DO have some pinned topics and wish those to stay on top use:
ORDER BY topic_pinned DESC, topic_id ASC
And hopefully that will do the trick. Oh – one more thong…
As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/)