Reply To: Create New Topic button
Hi Robin,
thanks for the suggestion, of course I was looking at the code in the plugin before.. but it had overwhelmed me :))
so, after your tip, here is what I ended up with,
add_action ( 'bbp_template_before_single_forum', 'new_topic_button' ) ;
function new_topic_button () {
if ( bbp_current_user_can_access_create_topic_form() && !bbp_is_forum_category() ) {
$text=__('Create New Topic') ;
$href = apply_filters ('new_topic_button' , '#new-post' ) ;
echo '<a class="new_topic_button" href ="'.$href.'">'.$text.'</a>' ;
}
}
probably there is a more elegant solution.. as the button didn’t want to go to a line below the breadcrumbs.. had to use css
.new_topic_button {
background-color: #0066CC;
border: 0;
border-radius: 5px;
color: #fff;
font-size: 16px;
font-weight: 600;
padding: 15px 30px;
text-decoration: none;
width: auto;
display: block;
width: 200px;
margin-top: 30px;
}