Home Forums Basel – Premium Template Hide Prices in search

This topic contains 5 replies, has 2 voices, and was last updated by Elise Noromit Elise Noromit 2 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #168547


    Hello there,
    I have enabled catalog mode and I hide all the prices with functions:

    //Remove prices from grids
    remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
    //remove prices from product pages
    add_filter( 'woocommerce_variable_sale_price_html', 'clr_remove_prices', 10, 2 );
    add_filter( 'woocommerce_variable_price_html', 'clr_remove_prices', 10, 2 );
    add_filter( 'woocommerce_get_price_html', 'clr_remove_prices', 10, 2 );
    function clr_remove_prices( $price, $product ) {
    if ( ! is_admin() ) $price = '';
    return $price;

    But when i click the search button on the front page The results that it brings have prices.
    How can I remove prices from there.

    Thank you very much.



    Please add this code to the functions.php of the child theme to hide the prices:

    function basel_header_block_search() {
       $header_search = basel_get_opt( 'header_search' );
       if( $header_search == 'disable' ) return;
       $classes = 'search-button';
       $classes .= ' basel-search-' . $header_search;
       if ( basel_get_opt( 'mobile_search_icon' ) ) $classes .= ' mobile-search-icon';
          <div class="<?php echo esc_attr( $classes ); ?>">
             <a href="#">
                <i class="fa fa-search"></i>
             <div class="basel-search-wrapper">
                <div class="basel-search-inner">
                   <span class="basel-close-search"><?php esc_html_e('close', 'basel'); ?></span>
                   <?php basel_header_block_search_extended( false, true, array('thumbnail' => 1, 'price' => 0), false ); ?>

    Best Regards



    Thank you very much for the quick reply Elise.
    It works for the desktop version, but it still shows the price in the mobile version.
    I attach to you my search theme options.

    You must be logged in to view attached files.


    Please provide the site admin access to the private area.

    Best Regards



    Sorry Elise, this is in production and the only staging environment that I have is in localhost.
    But nevermind I disabled search for mobile and I am ok for this solution for know.
    Thank you very much.


    Fine. If you have any questions please feel free to contact us.

    Best Regards

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

You must be logged in to reply to this topic.