Tagged: ajax search, page
-
AuthorPosts
-
March 27, 2018 at 9:44 am #933506
dear support,
is there a way to position the ajax-search from the menu in a page? For example like on top of the products?
thanks for any helpMarch 27, 2018 at 9:58 am #933518Hey dondela,
Here are some threads to consider:
https://kriesi.at/support/topic/shortcode-or-function-to-add-search-in-custom-locations/If you need further assistance please let us know.
Best regards,
VictoriaMarch 27, 2018 at 10:17 am #933535Thanks for the links Victoria.
But i wanted to know if it is possible to place the ajax-search somewhere else than the menu. This widget-search just show the “normal” search field.March 28, 2018 at 9:03 am #934045Dear support,
i bought a serach-plugin to achieve the in-page search i wanted. I managed to include it with a shortcode on the shop-main-page.
But i don`t know how i can include that shortcode on the different category-pages?March 28, 2018 at 11:19 am #934126Hi,
Thank you for the update.
Please use the “ava_after_main_container” hook in the functions.php file.
add_action( 'ava_after_main_container', 'avia_woocommerce_shop_search', 10 ); function avia_woocommerce_shop_search() { $output = ''; $output .= '<div class="container">'; $output .= 'SEARCH SHORTCODE HERE'; $output .= '</div>'; echo $output; }
Include the search shortcode in the output variable.
Best regards,
IsmaelMarch 28, 2018 at 11:32 am #934140Hi Ismael, thank you for your help.
i tried the following but the shortcode is not executed it just shows up as [avia_search]add_action( ‘ava_after_main_container’, ‘avia_woocommerce_shop_search’, 10 );
function avia_woocommerce_shop_search() {
$output = ”;
$output .= ‘<div class=”container”>’;
$output .= ‘[avia_search]’;
$output .= ‘</div>’;
echo $output;
}March 28, 2018 at 12:18 pm #934197Hi dondela,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaMarch 28, 2018 at 12:29 pm #934210Hi Victoria, sure!
March 28, 2018 at 9:25 pm #934514Hi,
The code you puted is wrong, please copy from the following link
https://pastebin.com/VmMNjUd7Best regards,
BasilisMarch 29, 2018 at 9:36 am #934724HI Basilis,
is inserted that code but nothing has changed. I still see the just the shortcode on the page instead of the search field. What could be the fault?March 30, 2018 at 6:53 am #935126Hi dondela,
Here is the version of code that shows the serach form:
add_action( 'ava_after_main_container', 'avia_woocommerce_shop_search', 10 ); function avia_woocommerce_shop_search() { $output = ''; $output .= '<div class="container">'; $output .= do_shortcode('[avia_search]'); $output .= '</div>'; echo $output; }
If you need further assistance please let us know.
Best regards,
VictoriaMarch 30, 2018 at 10:10 am #935205Dear Victoria,
great – it works now! Would it be possible to place the search above the sort options of the product pages?
Thank you very muchMarch 30, 2018 at 10:48 am #935229Hi dondela,
For that, you will need to dig into the WooCommerce filters and actions and to find the one to assign your filter to.
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.