not precisely what you want, but my style pack plugin has a ‘create new topic’ button which takes then to the form on that page, so achieves most of what you are after
bbp style pack
once activated go to
dashboard>settings>bbp style pack>buttons
Hi Robin,
Thank you very much for your prompt reply.
I have used your plugin; it is extremely helpful and convenient.
But I was forced to remove it, because I am using the ‘Youzer’ plugin for buddypress and bbpress, and it seems to not work very well with that. (i.e the appearance of the forums end up looking weird.)
Is there some other way this can be done?
Thank you
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
Code Snippets
add_action ( 'bbp_template_before_single_forum', 'rew_create_new_topic' ) ;
function rew_create_new_topic () {
$text='Create New Topic' ;
if ( bbp_current_user_can_access_create_topic_form() && !bbp_is_forum_category() ) {
$href = '#new-post' ;
echo '<div class="rew-new-topic"> <a href ="'.$href.'">'.$text.'</a></div>' ;
}
}
but you’ll have to work out how to style it yourself I’m afraid !!
Hello Robin
Thank you for the code.
I added it to my child theme’s function file and the link is now displayed in my forums page.
However, whenever I click the link it doesn’t seem to work. Meaning, it doesn’t lead to anywhere. Is there something else I need to do other than that to get the link to work?
-M
hmmm – do you have the form showing at the bottom of the page ?
No, actually it’s at the top.
sorry, you have the topic form at the top, or the ‘create new topic’ button at the top ?
The ‘create new topic’ button is at the top.
but no form at the bottom?
No, no form at the bottom.
ok, have you removed this, it should show? might be a theme or other plugin that has done this
Ah yes, I remember that I hid the form using the content-single-forum.php file because I wanted users to click on a button to access the form. Thank you for the advice.
The button is working now, but is there anyway to hide the form until a user has clicked on it?
For instance putting it in another page, or only bringing it up in the same page when the ‘create new topic’ link is clicked?
there probably is but beyond free code.
I see…so there is no way to relocate the form to another page with free code?
not unless you can find someone to write it for free 🙂
Ok, I see. Thanks for your help anyway. 🙂