Do i need to provide more information for this query to be answered?
no just a little patience !
Thx, didn’t mean to be pushy
Use this PHP code place it into a child theme functions.php file or use a plugin like functionality.
//display bbPress search form in search results
function rk_bbp_search_form_in_search_results(){
if ( bbp_allow_search() && bbp_is_search_results() ) {
?>
<div class="bbp-search-form">
<?php bbp_get_template_part( 'form', 'search' ); ?>
</div>
<?php
}
}
add_action( 'bbp_template_before_search', 'rk_bbp_search_form_in_search_results' );
Also look at this guide.
https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#23-show%c2%a0the-bbpress-forum-search-everywhere
Hi Robkk,
Thanks for the code. unfortunately it doesn’t work for my website. Well, I have a vagrant set up on my computer with a copy website and i test everything there before i make real changes.
I made a child theme and a style.css file (this works as my wordpress site recognises it) and i made a functions.php file and added the code you gave me. The thing is, i tried some other code that exists on https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#23-show%c2%a0the-bbpress-forum-search-everywhere and they didnt work either.
any suggestions?
would greatly appreciate any help.
thx
Dan
Hi,
can you tell me if its actually worth adding a child theme, if the parent theme is an individually created one by a web design company? There wont be any updates to this theme.
Also, can you explain what you meant by “… or use a plugin like functionality. “.?
Also, can you explain what you meant by “… or use a plugin like functionality. “.?
This plugin its called Functionality, its like a plugin that can hold custom php code snippets.
https://wordpress.org/plugins/functionality/
Thanks for the code. unfortunately it doesn’t work for my website
Both of the code snippets I posted should show the forum search above a single topic, single forum, and in search results. Well unless your custom theme has custom bbPress templates with all the available hooks I am using in my code removed.
can you tell me if its actually worth adding a child theme, if the parent theme is an individually created one by a web design company?
I mean you do not have to.
Hi,
can you tell me if i should be able to add this to my functions.php file and it should work?
The reason i ask is that i have tried it and it doesnt show any search box after the initial search.
thx