I figured everything out except the post count. On the bbpress forum widget, I would like to have the post count next to the forum like this website has.
I would also like to know how to change the color of the individual user roles.
Hi 🙂 Can you please let me know that how you could add “create new topic” button?
@sina_mech
add this into your child themes functions.php file or put the snippet in a functionality plugin.
function rk_new_topic_button() {
echo '<a href="#new-topic-0" class="bbp-new-topic-button button btn input[type="button"]" >New Topic</a>';
}
add_action('bbp_template_before_topics_loop','rk_new_topic_button');
Thank you for your reply. I have “bbpress” folder in MY_THEME folder. I added a functions.php file in that bbpress folder, and inserted your code, and saved. but nothing happened 🙁 Am I doing it right?
can you help me on this issue?
@sina_mech
why did you put a functions.php file in your bbpress folder it wouldnt work that way.
just place it in your themes functions.php or use a plugin like this
https://wordpress.org/plugins/functionality/
At first I added it to the functions.php (in Theme folder), but nothing happened! That’s why I added it to another folder. However, I added it again to functions.php in theme folder, but no button so far 🙁
OK! I made a mistake 🙂 It’s working now. Thank you very much.
But is there any way that we can acquire the parent forum ID, and create a dynamic pop up or a new page to create topics?
you can do new page.
just create a new page in wordpress called new-topic or something.
put the shortcode [bbp-topic-form]
in it.
then change my function to this instead.
function rk_new_topic_button() {
echo '<a href="/new-topic/" class="bbp-new-topic-button button btn input[type="button"]" >New Topic</a>';
}
add_action('bbp_template_before_topics_loop','rk_new_topic_button');
Thank you for your reply. The code you just suggested, shows the form in new page. Still users have to choose the parent forum, in which they would like to publish their topic. I was wondering if there is a way that like other forums, user can create the topic IN THE CURRENT FORUM by pishing the NEW TOPIC button at the corresponding forum (without any need to choose the destination forum in the form).
@sina_mech
if your looking for something custom post a job and maybe a developer would create this functionality for you.
http://jobs.wordpress.net/
I appreciate your reply. As it was not for me but I liked your action.
Hello, Robkk @robkk
I would like to use this code. But changed href="/new-topic/"
to subscrible and favorite topic. Can you help please to change correct ID subscrible and favorited? I used id="subscription-toggle"
but given me only text, whitout function
function rk_new_topicaaa_button() {
echo '<span id="subscription-toggle" >
<span class="bbp-new-topic-subscription-toggle-button" > subscription-toggle</span>
</span>';
}
add_action('bbp_template_before_single_topic','rk_new_topicaaa_button');