Skip to:

Multiple create topic forms

  • Stuart Neilson


    Is it possible to have more than one create a topic form on the forum page?

    I’d like one at the top and bottom of the forum list, i’ve added a second

    <?php bbp_get_template_part( 'form', 'topic' ); ?>

    to the top of content-single-forum.php

    They are both hidden inside collapsing divs which are toggled by a “new topic” button, the first form at the top works fine but the second at the bottom shows no quicktags-toolbar.

    What do I need to do so that both work?

    I also have an issue where if I press tab from inside the topic title field of the first form it moves me down to the second forms “wp-editor-area”

Viewing 1 replies (of 1 total)

  • Robin W


    why not just have one form, referenced by a button at the top.

    function bsp_create_new_topica () {
    	 $text='Create New Topic' ;
    	if ( bbp_current_user_can_access_create_topic_form() && !bbp_is_forum_category() ) echo '<div style="text-align: center;">  <a href ="#topic">'.$text.'</div>' ;
    function bsp_create_new_topicb () {
    	echo '<a name="topic"></a>' ;
    add_action ( 'bbp_template_before_single_forum', 'bsp_create_new_topica' ) ;
    add_action( 'bbp_theme_before_topic_form', 'bsp_create_new_topicb' ) ;

    (not tested as its cut down code from one of my plugins)

    adds a link which lets you add a link to the top of the page which sends you to the bottom, which you can easily make a button.

    add to your functions file

    or take the guts into the template you’re amending.

    You could probably send it to a collapsing div at the bottom if you tinker

    That way you only have one form

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar