Upgraded to WordPress 6.0 and have issues? Please check the hotfix which you need to apply.

Okay
  Public Ticket #1965605
Header icons
Closed

Comments

  • santoscoydev started the conversation

    Hi, I would like to move the search icon from the right menu, to be the first option on the left menu. How can I archive it?

  •  228
    Milingona replied

    Hi,

    You can achieve that by replacing lines 90-104 of 'wp-content/themes/bakery/includes/filters.php' with the following code:

    function bakery_wp_nav_menu_items( $items, $args ) {
        if ( ($args->theme_location == 'main-menu-full' or $args->theme_location == 'main-menu-right') and bakery_get_option('header-show-search-icon', false) == true ) {         ob_start(); ?>
                <li class="vu_search-menu-item">
                    <a href="#"><i class="fa fa-search" aria-hidden="true"></i></a>
                </li>
            <?php         $search_item = ob_get_contents();
            ob_end_clean();         $items = $search_item . $items;
        }     return $items;
    }

    As well as adding the style below in Bakery > Custom Code > Custom CSS:

    .vu_search-menu-item {
       margin-right: 10px !important;
       margin-left: 0;
    }

    Kind regards,


    Milingona Support

    Follow on     Envato     Facebook     Twitter

  • santoscoydev replied

    Excellent!  but I want to apply it to the child theme. 

    I already copied the complete folder called "Includes" to my child theme and tried to modify 'includes/filters.php'  with the code you gave me but is not working. It works only when I modify the fail on the main theme.

  •  228
    Milingona replied

    You're right! You cannot apply this to the child theme for the moment. There are needed some modifications in the theme files which we have just added in the to-do list for the upcoming updates. So for now please just leave the changes as they are in the parent theme.

    Thanks and cheers,


    Milingona Support

    Follow on     Envato     Facebook     Twitter