1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Solved Woocommerce Search Bar in Divi Header Main Menu

Discussion in 'Free Divi Community Forum' started by Ziuccio, May 24, 2019.

  1. Ziuccio

    Ziuccio New Member

    Hi Everyone!

    Just looking for some precious help, I'm getting crazy!

    I'm trying use the plugin AJAX Search for WooCommerce within the main menu in my website, instead of the default search method.

    In the header.php I added the code
    <?php echo do_shortcode('[wcas-search-form]'); ?>

    2 questions:

    1) The Custom CSS editor in DIVI -> theme Options seems to have the priority on the style.css.
    Editing here the output changes. Editing the style.css with the same code the output does not change. Why?

    2) I'm not able to center the new input search and make it responsive as the other components in the header (logo and menu). Do you have some css element that help me?

    As attachment some examples to make clear what I need.

    Really appreciate in advance your suggestions!!
     

    Attached Files:

    1. PRO MEMBER PERKS Divi Block Pro - Premade card carousel design for your Divi site without using any plugins:View Demo
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    Divi Theme Options does have higher priority. For your style.css, you can try to use !important tag. If still not working, additionally add #page-container in front of your CSS.
    Kindly share your URL.
     
  3. Ziuccio

    Ziuccio New Member

    Cool! Thank you very much!

    I use my localhost with XAMPP as development environment. But anyway I changed my mind about the position of the input search. I'm trying to locate in the same position of the old one.

    I'll out my heder file and the css

    Header.php

    Code:
    Log In or Sign Up to view this code.

    Custom CSS.
    Code:
    Log In or Sign Up to view this code.
    The alignement isn't nice at all.

    added as attachment the pictures of the result .

    04.a Hader_full_OuterSearchHidden.jpg
    04.b Hader_full_OuterSearchVisible.jpg
    05.a Hader_full_ResizedOnScroll_OuterSearchHidden.jpg
    05.b Hader_full_ResizedOnScroll_OuterSearchVisible.jpg
    06.a Header_mobile_OuterSearchHidden.jpg
    06.b Header_mobile_OuterSearchVisible.jpg


    I'm seriosly consider to quit the challenge and back to the standard search....
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade horizontal timeline design for your Divi site without using any plugins:View Demo
  4. Divi.Help

    Divi.Help Administrator
    Staff Member

    Quite some effort to make it right. Try the below CSS in Divi > Theme Options > Custom CSS:
    Code:
    Log In or Sign Up to view this code.
     
  5. Ziuccio

    Ziuccio New Member



    G-R-E-A-T!!!!!!!

    Thank you so much! Now I need just to adjust some minor stuff like colors and font size but I can cope it! (maybe)

    Thanks again!
     
    1. PRO MEMBER PERKS Divi Ultimate Archive Plugin - Beautify your Divi archive / category page with 15 different premade blog designs:Learn More
  6. jim blug

    jim blug New Member

    Hi ! Thanks for this help , i follow your steps but i have some issues.

    1. as you can see the new search bar, does not replace the old one.

    2. There is a big investment problem compared to the old bar of research.

    3. the new search bar goes below my header, is this a Z-INDEX problem?

    4. I have a particular request, which seems to be complicated but maybe you could help me:
    I would like the search icon to be in the top header and when we scroll the search icon come in the main header (because when I scroll I hide my top header)
    Do you think that's possible?

    Here is the link of my site in production: http://article10.fr/

    and here is some screen of what I would like to get with my problem numbers 4.
    Capture d’écran 2019-08-08 à 17.33.30.png Capture d’écran 2019-08-08 à 17.33.40.png