Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #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.
    #1004860

    Hey 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,
    Victoria

    #1004885

    OK sure!
    Please look at the attached mockup image, the top bar needs a search field.

    #1005008

    Hi,

    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,
    Vinay

    #1005139

    Thanks Vinay,
    This worked somehow, but how do I get it right and in line with the top-bar menu as in the mockup?

    #1005266

    Hi,

    Thanks for the screenshot. Please try this in Quick CSS:

    .phone-info {
      float:right;
    }

    Best regards,
    Rikard

    #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.

    #1005424

    Hi beenee,

    I don’t see the form added anywhere. Did you remove it?

    Best regards,
    Victoria

    #1005439

    Hi 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!

    #1005461

    Hi 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,
    Victoria

    #1006682

    @Vinay sorry,
    that was to quick…
    How do I get this to work in the actual theme, it works in the child theme. I haven’t fully understood which code you added to the functions.php
    thanks!


    @Victoria
    , perfect thanks!!! Works well in the child theme! Not sure what Vinay did with the functions.php …?

    #1006718

    Hi beenee,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1006720

    Thanks! 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!

    #1006742

    Hi 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,
    Victoria

    #1006751

    Ah OK, but how will I get it to work on the live side? I’m sorry I never worked with a child theme befor…

    #1006992

    Hi 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,
    Victoria

    #1007408

    Hi,
    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.

    #1008180

    Hi,

    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,
    Ismael

    #1008346

    Thanks 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!

    #1008690

    Hi,

    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,
    Ismael

    #1008812

    wow 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!

    #1008911

    Hi beenee,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

Viewing 22 posts - 1 through 22 (of 22 total)
  • You must be logged in to reply to this topic.