-
AuthorPosts
-
September 3, 2018 at 10:31 am #1004831
Hi there, as the title says..
The top bar menu needs a search function.-
Also need to eliminate the search in the header main menu which seems straight forward (Quick css):#menu-item-search { display: none; }
I’ve seen many older threats/posts on displaying search function on the top bar menu. This involved to alter the header.php. Unfortunatelly none of the older posts worked in that case as the syntax of the header.php changed (and I’m not a php guru…)
Can you help please?
- This topic was modified 6 years, 3 months ago by beenee.
September 3, 2018 at 11:22 am #1004860Hey Stefan,
Could you please attach a mockup of what you’re trying to achieve?
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaSeptember 3, 2018 at 11:45 am #1004885OK sure!
Please look at the attached mockup image, the top bar needs a search field.September 3, 2018 at 3:12 pm #1005008Hi,
I checked your site and tried to make the changes but I noticed you are not using a child theme. It is best to use a child theme and make these modifications or else you will lose the changes you have made when the theme updates.
Please activate the child theme and add the search function in the functions.php file then go to Enfold > Header > Extra Elements > Extra info and add the shortcode provided in the below link.
Best regards,
VinaySeptember 3, 2018 at 7:39 pm #1005139Thanks Vinay,
This worked somehow, but how do I get it right and in line with the top-bar menu as in the mockup?September 4, 2018 at 5:36 am #1005266Hi,
Thanks for the screenshot. Please try this in Quick CSS:
.phone-info { float:right; }
Best regards,
RikardSeptember 4, 2018 at 9:19 am #1005332@Vinay: I haven’t fully understood why this worked in the (now activated) child theme and not in the actual theme. I’m not sure which code to use in the function.php @ https://kriesi.at/documentation/enfold/search/
@Rikard: I don’t get it positioned in the top right also with the given css.September 4, 2018 at 11:20 am #1005424Hi beenee,
I don’t see the form added anywhere. Did you remove it?
Best regards,
VictoriaSeptember 4, 2018 at 11:25 am #1005439Hi victoria,
I switched back to the child theme. It only seems to work there, as I don’Ät understand what Vinay has changed I don’t know how to procede …:-(
Thanks for your help!September 4, 2018 at 11:50 am #1005461Hi beenee,
Here is the code you can put in Enfold > General Styling > Quick Css, if it does not work, put into themes/enfold/css/custom.css
@media only screen and (min-width: 768px) { .av_secondary_right .sub_menu { padding-right: 160px; } .av_phone_active_left .phone-info { position: absolute; right: 0; float: none; padding: 0; } .av_phone_active_left .phone-info #searchform #searchsubmit { font-size: 13px; width: 30px; line-height: 30px; } #top .av_minimal_header #s { padding: 9px 47px 9px 7px; } }
If you need further assistance please let us know.
Best regards,
VictoriaSeptember 6, 2018 at 4:01 pm #1006682September 6, 2018 at 4:39 pm #1006718Hi beenee,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
VictoriaSeptember 6, 2018 at 4:41 pm #1006720Thanks! How do I get this to work in the actual theme, it works in the child theme. I haven’t fully understood which code was added to the functions.php …? …refering to Vinay …see above!
September 6, 2018 at 5:07 pm #1006742Hi beenee,
It has to stay in the child theme, if you want it in the parent theme, it will be lost with the next update.
Best regards,
VictoriaSeptember 6, 2018 at 5:25 pm #1006751Ah OK, but how will I get it to work on the live side? I’m sorry I never worked with a child theme befor…
September 7, 2018 at 9:43 am #1006992Hi beenee,
Copy the child theme to the live website, export theme settings from the parent theme and import them to the child theme.
If you need further assistance please let us know.
Best regards,
VictoriaSeptember 8, 2018 at 12:53 pm #1007408Hi,
I did exactly as you said. reinstalled the Enfold child theme and export the parents theme settings into it. It didn’t work, in fact I lost the settings that worked in the child theme before. top menu search has vanished :-(
If I use the “freshly” installed child theme it works. Any more ideas?
I need to mention that I’m new in using the child theme but I’m eager to understand what happens.September 11, 2018 at 6:27 am #1008180Hi,
We’ve added this code in the functions.php file.
add_shortcode('avia_search', 'get_search_form');
And then used the [avia_search] shortcode in the “Header” > “Extra Elements” > “Phone Number or small info text” field. (see private field)
Best regards,
IsmaelSeptember 11, 2018 at 11:59 am #1008346Thanks Ismael, this works!!!
I understand, that the functions.php will be potentially overwritten by Enfold updates and I have to finally fully understand the concept of a child theme which is yet not clear enough for me.
Thanks again!September 12, 2018 at 4:22 am #1008690Hi,
I’m glad it worked. :)
Yes, you need to move it to the child theme. This particular section of the documentation should help.// https://kriesi.at/documentation/enfold/how-to-install-enfold-theme/#why-child-theme
Best regards,
IsmaelSeptember 12, 2018 at 10:00 am #1008812wow txs, (Now I got it, the child theme needs to be active ;-)) … it helps to get the right resources and it’s a major benefit to be able to read ;-)
Problem solved!September 12, 2018 at 1:58 pm #1008911Hi beenee,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.