Divi Secondary Menu Configuration

Today I am going to share a tip with regards to our beloved theme Divi from Elegant Themes. Divi is my favorite theme (as well as others also I hope). The secondary menu is a nice & slick one and I love to fiddle with it. Putting a login / logout link in secondary menu makes it look good. Later I started thinking what else way I can make use of it. I have already seen tips in Divi facebook forums how to change the alignment of mobile number and e-mail ID from left to right. It came to me, how I may always available search box in secondary menu? The search in Divi primary menu looks a little bit odd to me. So I put the following code in header.php (obviously using a child theme):

<?php get_search_form(); ?>

The code need to be put before the following lines in header.php:

</div> <!– .container –>
</div> <!– #top-header –>

The search box appeared just after the e-mail ID at left side – but I needed it in right side only! So the following CSS need to be inserted in Custom CSS section:

#searchform { float: right; }
.screen-reader-text { display: none; }

And it’s just what I expected.