Porto theme

This article explains how to replace the native search bar in the Porto theme by p-themes.

Replacing is based on editing the Porto child theme. Make sure you have installed the Porto child theme. If not, install it.

To replace the search bars, add the following code to your website:

add_filter('porto_search_form_content', function ($html) {

    $html = do_shortcode('[fibosearch]');

    return $html;
});

add_filter('dgwt/wcas/scripts/mobile_breakpoint', function () {
    return 768;
});

add_action('wp_head', function () {
    ?>
    <style>
        .header-center .dgwt-wcas-search-wrapp {
            width: 440px;
        }

        #header .searchform-popup .search-toggle {
            display: none !important;
        }

    </style>
    <?php
});

Learn how to add this snippet to your WordPress.