Search Bar in Menu

Home Forums Iconic One Pro Support Search Bar in Menu

This topic contains 1 reply, has 2 voices, and was last updated by  Themonic-Support 4 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #666


    I am adding search bar in wordpress menu bar
    using this code in functions.php

    //wordpress search in menu bar
    add_filter('wp_nav_menu_items','add_search_box', 10, 2);
    function add_search_box($items, $args) {
            $searchform = ob_get_contents();
            $items .= '<li>' . $searchform . '</li>';
        return $items;

    In iconic theme version, its showing fine.

    In pro version, see both screenshots



    In the Pro version, the search form accessible via Appearance -> widgets is pre- styled which is the reason it is behaving like that. You can place it in the sidebar or footer widgets to see how it appears by default.

    Search form in the menu bar is entirely possible by removing searchform style css completely but it is not recommended because we are not sure how it will behave in the responsive environment. If you have implemented it already let me know the URL so that I can have a look.

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

You must be logged in to reply to this topic.