if you’ve copied/pasted it from your code, then you have a space after ‘my_custom_display_topic_index_query and before the closing ‘ bracket
ie
‘my_custom_display_topic_index_query '
when it should be
‘my_custom_display_topic_index_query'
Thank you for your response.
I have gotten the alphabetical order arrangement.
Now i want to arrange the a specific forum topics based on ID on the front-end.
Please help
sorry, but I don’t understand exactly what you are trying to do, or whether my previous response helped or not.
Can you come back please with further detail.
Sorry if my response was not good.
What i meant was, Your suggestion was together with a few adjustments i made to the code, which i used to get the alphabetically arrangement of a specific forum topic.
Now i want to arrange another specific forum topic in a specic order using there ID i guess.
For example, I want to arrange the following topic to another arrangement.
Topic ID
I enjoy bbpress 655
I want bbpress 658
I love bbpress 660
bbpress 662
To be arranged like this
Topic ID
I love bbpress 660
I want bbpress 658
bbpress 662
I enjoy bbpress 655
That’s what i want to do now, I was hoping you could help me.
Thanks for your time
ok, thanks – now I think I understand
so within a specific forum, you want these topics to appear in that order – can you let me know if there are other topics which also need to appear below – eg these are the first 5 and then all others appear in date order, or are these the only 5 topics?
Thank you very much for your time on this.
No there are not other items except other forums. The 5 topics above are just demo, The topics in total are about 20 topics.
so are these forums within a forum list, or topics within a forum?
I’m not sure i understand your question.
Here is another explanation of what i meant
I have 5 forums and each of them as about 20 topics.
Earlier i asked for help on how to arrange all the topics in one of the forums alphabetically which i got help.
Now i want to arrange the all the topics in another forum in a specific order which i have highlighted.
I hope you understand my explanation, How i wish i can get to give you a call or something to pass the message clearly but based on the description above i think that should be clear enough .
Thanks for your help
hmm.. The only way I can immediately think of is to modify loop-topics
so
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpress
where %your-theme-name% is the name of your theme
find
wp-content/plugins/bbpress/templates/default/bbpress/loop-topics.php
Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/loop-topics.php
bbPress will now use this template instead of the original
and you can amend this
so in that file you will see
<?php while ( bbp_topics() ) : bbp_the_topic(); ?>
<?php bbp_get_template_part( 'loop', 'single-topic' ); ?>
<?php endwhile; ?>
you would need to check with forum the user is in and then custom display
so something like – you’d need to write the code – this is just words !
<?php
if (forum == the one you want to change) {
then make an array of the ID, and then cycle through them
foreach ($topics as $topic) {
bbp_get_template_part( 'loop', 'single-topic' );
}
}
else { ?>
<?php while ( bbp_topics() ) : bbp_the_topic(); ?>
<?php bbp_get_template_part( 'loop', 'single-topic' ); ?>
<?php endwhile; ?>
<?php } ?>
Wow…. Thank you, I will try and get back in touch with you.