Sort topics in a Forum
-
Hi,
I have some forums in my website. I want to sort the topics in a forum in a different manner than “last message” order. I have tried sort-topic-replies plugin but it does not give me a solution to my problem.
I hope you could find the way to fix this issue. Thanks a lot.
-
can you say what order you would like them sorted into?
I would like to sort topic in an alphabetical way or depending the date of the topic was created.
Thanks a lot
date order:
put this in your functions fil :
function rew_date_topic_order( $args ) { $args['orderby']='date'; $args['order']='DESC'; //change to ASC to put oldest at top return $args; } add_filter('bbp_before_has_topics_parse_args','rew_date_topic_order');
Is it possible to use this for only one out of 4 forums?
I would like 3 of the forums to have the topic with the newest reply on top, but one I would like to have it in order of topic creation.
Greetings,
Samyes, install my bbp style pack and go to
dashboard>settings>bbp style pack>Topic Order
where you van set a default order, and then another order for specific forum(s)
Hey,
I have to sort the replies of the forum topics.
I want latest replies to be shown first. Please help me.
Is there any way I can implement this?Thankyou
I have to sort topics and replies in bbpress forum changing code how can I do it?
what I have to edit in bbp style pack to get that latest replies first? I selected decending but its not changing
so not the order the topics show in the forum list – BUT the replies to a specific topic to show first – yes ?
yes I want latest replies to be shown first
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
add_filter('bbp_has_replies_query', 'rew_modify_replies_query'); function rew_modify_replies_query($bbp_r) { $bbp_r['order'] = 'DESC'; return $bbp_r; } add_filter('bbp_show_lead_topic', 'rew_show_lead_topic'); function rew_show_lead_topic () { return true ; }
Thankyou So Much ! It worked for me! Finally got sorted list without plugin.
great – glad you are fixed
Hello Robin,
Thank you for the help you offer.
I tried the code in the child theme’s function file and it works fine to re-order the replies… BUT I have 3 issues :
– The link given in the recent activity widget leads to the last page of the topic… now being the beginning, so not the last reply
– Same problem for the link in the email notification
– and when we post a reply, the page refresh leads to the beginning of the topic too so you don’t see you answer published unless you click on the right page number or scroll back to the top.
These 3 situations imply too much confusion for the users so I choose to not use the code but don’t find another solution.I’m surprised no plugin exists for this ( part from “bbPress – Sort topic replies ” which is not maintained so I didn’t try it worried to get security problems).
Do you think of a way to fit the issues generated with the descending order or do you consider it is too much of “torsion” of the system ?
Thanks again.
SophieI’ve taken a look, and yes lots of code changes to get replies in reverse order, and currently too much of a challenge to try and do !
Sorry !
Hello,
I also have a question regarding the order of topics in a forum. For me it’s very easy, the topics should be sorted from the date they have been published (old to new) and stay that way. What code do I have to use?
Thank you!
Best regards
René
- You must be logged in to reply to this topic.