Quantcast
Channel: bbPress.org » All Posts
Viewing all articles
Browse latest Browse all 3638

Reply To: Multiple create topic forms

$
0
0

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 https://codex.bbpress.org/functions-files-and-child-themes-explained/

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 all articles
Browse latest Browse all 3638

Trending Articles