Support Forum
Hello,
this is the first time I notice this happening: the last 3 topics in a forum are not ordered correctly from the most recently created onwards. I cannot work out why, so I attach you 2 screenshots: the display settings and the forum view. It is in Italian but I think you can understand (giorni = days, ore = hours, settimana = week. The dates in the topic titles are the real creation dates of the topic itself and I checked they are the same as the real topic dates (can make more screenshots if you like, please let me know).
How can I solve this please? Thanks and have a good day!
My forum (in Italian) is: MsPforum
I am not totally sure what you are meaning so perhaps if I describe how things are naturally sorted then you can tell me if this is what you were expecting!
Simple:Press follows the common practice in forums of sorting topics by their most recent reply. So if an old topic receives a new post, that topic will bubble back to the top of the topic listing etc..
So - is that not what is happening here? Or is that not what you want to happen?
YELLOW
SWORDFISH
|
oh... so far it seemed it ordered by latest creation date. In fact if I add a reply to an earlier post it did not use to appear at the top of the topic. I remember setting it like this at the beginning and then I never paid too much attention but I think I would have noticed and today is the first time I see this happening...
In any case what I would like is to be able to have the topics in some forums ordered always for creation date ascending, is that possible?
My forum (in Italian) is: MsPforum
This is the way it has always been. The sort options you can change (as far as the forum view is concerned) is to reverse the default so that the oldest topic remains at the top of the list working down to the newest one. An odd thing but apparently some people like this.
What - I believe - you are asking for, is newest topics to be added to the top of the listing (as happens) but sorted by their FIRST post instead of their LAST post (which is the standard). Is that correct.
We should be able to do this with a simple filter. I will take a look this morning. I do wonder if such an option would be popular... I believe we have had one other user in the past request this...
YELLOW
SWORDFISH
|
ehm... I am not sure that we understand each other, maybe a problem with the jargon which surely I tend to misuse. I repeat again what I need trying to be more precise...
In 4 of my forums every day or week I or any other user start the post of the day, which I believe in jargon would be the "topic". I need, when the forum is accessed, to be viewed in ascending order of the creation date of these posts. So today I would see in order (apart from the pinned on top topics) the post of today followed by the one of yesterday and so on going back on time day by day.
Within the topic instead I need to see each users' post from the earlier to the latter in time, which is fine as it is.
Are we saying the same thing?
As for the other questions:
- I don't use a theme child although I have added a few lines to show the advertisments in some files.
- The ids of the 4 forums I need to view in this way are shown in this screenshot in the leftmost column I think:
the 4 forums are in the red box. Otherwise please tell me where to find the ids. Thanks a lot for helping!
My forum (in Italian) is: MsPforum
Yes - we are saying the same thing. nd you really should use a child theme to preserve changes. But - we can work around that.
Create a new and empty file in the 'wp-content' folder of your WP site named 'sp-user-functions.php'.
Add open and close php tags to the very top and very bottom of the ne file and add the following code:
add_filter('sph_forumview_query', 'my_topic_sort', 1, 2); function my_topic_sort($db, $data) { $fids = '&5&6&17&18&'; if ( strpos( $fids, '&'.$data->forumId.'&' )) { $db->orderby = 'topic_pinned DESC, spf_sftopics.topic_id DESC'; } return $db; }
Of course - you can change the function name if you wish to. That should do the trick I think. Careful with the case of variable names....
YELLOW
SWORDFISH
|
Thanks! I will try a bit later and will lwt you know
My forum (in Italian) is: MsPforum
Bad news Andy... after putting the file there the forum did not display topic anymore
Shall I send you the file in an MP so you see if I made any mistakes? Thanks
My forum (in Italian) is: MsPforum
1 Guest(s)