• Resolved ToTTi

    (@formgarten)


    On a customer woocommerce shop I use the astra theme. Is there a way to let this plugin play with the main astra search input field?

Viewing 1 replies (of 1 total)
  • Plugin Author Damian Góra

    (@damian-gora)

    Hi there

    Apologies for the delayed response.

    It will be working out of the box in future plugin releases, but at this moment you can use the following code. Add the following code in the child theme’s functions.php file.

    
    add_filter('astra_get_search_form', function ($form) {
    
        if (defined('DGWT_WCAS_NAME')) {
            $form = '<div class="search-form">';
            $form .= do_shortcode('[wcas-search-form]');
            $form .= '</div>';
        }
    
        return $form;
    });
    
    add_filter('wp_head', function () {
        if (defined('DGWT_WCAS_NAME')) {
            ?>
            <style>
                .ast-dropdown-active .search-form {
                    padding-left: 0 !important;
                }
    
                .ast-dropdown-active .ast-search-icon {
                    display: none !important;
                }
            </style>
            <?php
        }
    });
    
Viewing 1 replies (of 1 total)
  • The topic ‘Work around to work with astra theme?’ is closed to new replies.