-
AuthorPosts
-
July 22, 2020 at 2:27 pm #1232257
Hi, how can I add the search icon to the footer navigation instead of header?
July 22, 2020 at 7:57 pm #1232380Hey amyteslin,
Please have a look at the following thread:
https://kriesi.at/support/topic/shortcode-or-function-to-add-search-in-custom-locations/#post-436832If you need further assistance please let us know.
Best regards,
VictoriaAugust 5, 2020 at 5:11 pm #1235470Hi, it doesn’t achieve what I’m looking for. I want to have the icon that you can choose to have in the header, but I want it on my footer menu instead. Any ideas? Many thanks for your help.
August 5, 2020 at 11:14 pm #1235547And to what direction the search-input field should open?
Where does the ajax search results should toggle?
What happend to the scroll to top button?This in child-theme functions.php will place the magnifier icon in the menu3 of enfold:
function avia_append_search_nav3 ( $items, $args ) { if ((is_object($args) && $args->theme_location == 'avia3') || (is_string($args) && $args = "fallback_menu")) { global $avia_config; ob_start(); get_search_form(); $form = htmlspecialchars(ob_get_clean()) ; $items .= '<li id="menu-item-search3" class="noMobile menu-item menu-item-search-dropdown menu-item-avia-special"> <a href="?s=" data-avia-search-tooltip="'.$form.'" '.av_icon_string('search').'> <span class="avia_hidden_link_text">'.__('Search','avia_framework').'</span> </a> </li>'; } return $items; } add_filter( 'wp_nav_menu_items', 'avia_append_search_nav3', 10, 2 );
but i do not know how to get the ajax search results to show
August 6, 2020 at 11:45 am #1235655Hi amyteslin,
Did you try Guenni007’s suggestion above?
Best regards,
VictoriaAugust 10, 2020 at 2:40 pm #1236431Hi there,
I have added the code to functions but it hasn’t worked. I only have two menus, the main nav and the footer. I tried to create menu3 but it didn’t work.
August 10, 2020 at 3:07 pm #1236437as far as i know
1) the enfold main menu is always: .main_menu
( a class here because if you got menu below logo there will be an extra container ( #header_main_alternate) for that cloned menu)
2) the top menu : #avia2-menu
3) footer menu: #avia3-menu
these are theme_locations not names of the menu.are you familiar with developer tools of your browser? Inspect the footer menu and see what ID this menu has got.
but nevertheless – have you seen my concerns about the position?
August 10, 2020 at 3:15 pm #1236439Hi, I see now thank you. Is it not possible to achieve then? If not as part of the footer, how can I add it next to the social icons on my footer? Or is it the same issues? http://amyteslinstaging-com.stackstaging.com/weddings/
August 10, 2020 at 3:17 pm #1236440Or do you mean a navigation in the #footer ( not footer : #socket) – and you put a widget to one of your #footer columns by : navigation menu widget ???
August 10, 2020 at 3:19 pm #1236441ok – we posted the same time.
How did you create that footer? is it a page as footer ?August 10, 2020 at 3:21 pm #1236442I have just added the search option to the footer widget and it comes up s a bar but I would like it to be a search icon and not a bar.
Hope that makes sense!August 10, 2020 at 4:12 pm #1236449Well a quick and dirty way would be to activate the main menu search icon ( Dashboard – Enfold Child – Main Menu: “Append search icon to main menu”)
– and shift this to your other menu:function shift_search_icon(){ ?> <script type="text/javascript"> (function($){ $('#avia-menu').find('#menu-item-search').detach().appendTo('#menu-menu3'); })(jQuery); </script> <?php } add_action('wp_footer', 'shift_search_icon');
August 10, 2020 at 4:24 pm #1236453Hi, it’s doing something strange. When I open the page, I can see the icon is part of the menu but then it disappears. I’m not sure what I’ve done?!
- This reply was modified 4 years, 3 months ago by amyteslin.
August 10, 2020 at 4:43 pm #1236458on my test page is stayes at the menu.
can you try this:function shift_search_icon(){ ?> <script type="text/javascript"> (function($){ $('#avia-menu').find('#menu-item-search').clone().appendTo('#menu-menu3'); $('#avia-menu').find('#menu-item-search').remove(); })(jQuery); </script> <?php } add_action('wp_footer', 'shift_search_icon');
just to see if detach() is the problem
August 10, 2020 at 4:49 pm #1236460Ok, I got that working, but it is glitchy when trying to search, can you see what I mean?
August 10, 2020 at 5:00 pm #1236461Yes – it is the way you style your menu to have not the treestructure there but besides each other.
Look how you reach it in your css and try to substitute it by:
#footer .widget { padding: 0; margin: 30px 0 30px 0; overflow: visible; } #footer .widget_nav_menu ul { display: flex; flex-flow: row wrap; justify-content: center; } #footer .avia-search-tooltip { top: 100% !important; margin-left: -130px; }
but i do not know why the ajax search proposals aren’t there – did you switch of that feature?
August 10, 2020 at 5:09 pm #1236463and i guess you have some troubles with : CORS: https://kriesi.at/documentation/enfold/icon/#icons-are-showing-as-rectangular-boxes-
August 10, 2020 at 5:35 pm #1236470Thanks so much! It’s so nearly there. However, you’re correct about the icon but I have tried the coding in the link and it hasn’t fixed it :/
August 10, 2020 at 6:39 pm #1236478you have set an important rule to all buttons
font-family : butler lightso entypo-fontello is lost.
try this :
#top #footer #searchsubmit { background-color: #464f5a !important; font-family: entypo-fontello !important; line-height: 0 !important; } .avia-search-tooltip { top: 100% !important; } #footer .avia-arrow-wrap .avia-arrow { background-color: #464f5a !important; } #searchform #s { border : none !important; }
August 11, 2020 at 7:22 am #1236594August 11, 2020 at 4:28 pm #1236700It works! I really appreciate your help. Thanks so much!
August 12, 2020 at 9:18 am #1236888Hi amyteslin,
Great, I’m glad that you got it working. Please let us know if you should need any further help on the topic or if we can close it.
Thanks again to @guenni007 for helping out :-)
Best regards,
RikardAugust 21, 2020 at 1:36 pm #1239795Hi again, do you think there is a way on mobile view to get the search to drop onto a new line underneath? Thanks so much.
August 24, 2020 at 5:10 pm #1240419Hi amyteslin,
Best regards,
VictoriaAugust 27, 2020 at 8:50 pm #1241307first i do not see the input when i click the magnifier symbol for wide screens – because you have in your css a rule:
#top #searchform { display: none !important; }
and that hampers to show the input form !
I know that you want to replace the search there for smaller screens but duplicate ID’s are not good html.to avoid duplicate IDs add to the code above:
$('#menu-menu3').find('form').attr('ID', 'searchform-2');
so that there is then:
function shift_search_icon(){ ?> <script type="text/javascript"> (function($){ $('#avia-menu').find('#menu-item-search').clone().appendTo('#menu-menu3'); $('#menu-menu3').find('form').attr('ID', 'searchform-2'); $('#avia-menu').find('#menu-item-search').remove(); })(jQuery); </script> <?php } add_action('wp_footer', 'shift_search_icon');
you only had to set the css then for it to:
#top #searchform-2 { margin: 0; padding: 0; }
September 9, 2020 at 4:43 pm #1244665Hi guys, I have got it working now but ‘go to top’ button seems to have disappeared, do you know what’s happening? Thanks so much for your patients.
- This reply was modified 4 years, 2 months ago by amyteslin.
September 10, 2020 at 9:49 am #1244809Hi amyteslin,
https://share.getcloudapp.com/DOuxywLQ I am seeing the search and the button.
Could you please clear the cache, check again and get back to us.
Best regards,
VictoriaSeptember 10, 2020 at 11:57 am #1244873Hey, sorry I didn’t mention it is just on mobile so the ‘go to top’ button doesn’t show anymore.
Thanks!
September 10, 2020 at 12:11 pm #1244879yes – that is standard behavior on enfold – because a lot of mobile users know that a double tap on top of the browser window has the same effect.
but you can get it back if you overwrite the rule by:
( and to shift the button set the bottom and right position for it as you like )@media only screen and (max-width:767px) { .responsive #scroll-top-link { display:block !important; bottom: 10px ; right: 20px; } }
September 11, 2020 at 5:28 pm #1245202Perfect, thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.