Tagged: ,

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #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 help

    #933518

    Hey 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,
    Victoria

    #933535

    Thanks 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.

    #934045

    Dear 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?

    #934126

    Hi,

    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,
    Ismael

    #934140

    Hi 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;
    }

    #934197

    Hi 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,
    Victoria

    #934210

    Hi Victoria, sure!

    #934514

    Hi,

    The code you puted is wrong, please copy from the following link
    https://pastebin.com/VmMNjUd7

    Best regards,
    Basilis

    #934724

    HI 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?

    #935126

    Hi 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,
    Victoria

    #935205

    Dear Victoria,
    great – it works now! Would it be possible to place the search above the sort options of the product pages?
    Thank you very much

    #935229

    Hi 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

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.