Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #878095
    Paulo Tebet
    Participant

    Hi there,

    I have the Navbar Search enabled in the Customizer and I can see the magnifying glass icon to the far right in my Main menu.

    http://prntscr.com/ara92f

    But when I select the first option ( from left to right ) on the main menu “Casamento” the seach icon doesn´t appears…

    http://prntscr.com/ara9ni

    How can I have the search functionality on every menu that I have in my site?

    BTW, I started playing with some color customization that obviously isn´t finished. I am not that color crazy… 😉

    http://www.paulotebet.com

    Regards,

    Paulo Tebet

    #878583
    Rupok
    Member

    Hi Paulo,

    Thanks for writing in! You can follow these thread :

    https://community.theme.co/forums/topic/search-icon-in-a-custom-menu/

    https://community.theme.co/forums/topic/move-search-icon-on-my-topbar-menu/

    Let us know if that helps.

    Cheers!

    #878667
    Paulo Tebet
    Participant

    please add following code into your file :

    <a href="#" class="x-btn-navbar-search"><span><i class="x-icon-search" data-x-icon=""></i><span class="x-hidden-desktop"> Search</span></span></a>

    Which core file? I am assuming I will change some file from my child theme. That´s fine, I can change it´s content, I just need to know which file are you talking about.

    Thanks

    Paulo

    #879450
    Lely
    Moderator

    Hi Paulo,

    Would you mind providing us with login credentials so we can take a closer look on how you implement the custom menu? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #879919
    Paulo Tebet
    Participant
    This reply has been marked as private.
    #880618
    Jade
    Moderator

    Hi Paulo,

    Please try to add this code in the functions.php file in your child theme:

    /**
     * Add search in all menu items.
     * ===========================================
     */
    
    add_filter( 'wp_nav_menu_items', 'add_search_link', 10, 2 );
    
    function add_search_link( $items, $args ) {
        
        if(!wp_nav_menu(array('menu'=>'primary'))) {
    	    $items .= '<li class="menu-item x-menu-item x-menu-item-search">'
    			.'<a href="#" class="x-btn-navbar-search">'
    				.'<span><i class="x-icon-search" data-x-icon="" aria-hidden="true"></i><span class="x-hidden-desktop"> Search</span></span>'
    			.'</a>'
    		      .'</li>'; 
        }
        
        return $items;
    }

    Hope this helps.

  • <script> jQuery(function($){ $("#no-reply-878095 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>