-
AuthorPosts
-
October 21, 2015 at 4:04 pm #522359
Hi there. I’ve been trying to move the search form (not just the magnifying glass with the popup form) to #header_meta, let’s say, by the phone number area on the right but I’m having limited success. It looks like it will take a fair amount of CSS to make this work. Is there a way that’s currently supported by the theme that will make this work with minimal coding?
My apologies in advance if this has been answered elsewhere. I’ve spent quite a bit of time searching…
October 21, 2015 at 5:31 pm #522389Hey Kevin!
Please add following code to functions.php file in Appearance > Editor
add_shortcode('avia_search', 'get_search_form');
and then go to Appearance > Menus and add a new link and add following into navigation label in your Enfold secondary menu
[avia_search]
Regards,
YigitOctober 21, 2015 at 6:41 pm #522437Sadly, this didn’t work. See the website in Private Content. The shortcode doesn’t get processed and just displays as text. I’ve tried it with or without a URL attached to it and it does the same thing either way. Is there something special I have to do to make the wa
FYI, I’m doing this in a child theme if it matters.
Any idea why this didn’t work?
October 22, 2015 at 1:46 am #522676Hi!
Can you please try inserting the shortcode into phone info field in Enfold theme options > Header > Extra Elements?
Cheers!
YigitOctober 22, 2015 at 3:20 am #522698Doing so inserts the search box but breaks the layout. If you search for “leap” you’ll see that the search results preview also totally breaks the layout of the header when it shows.
October 22, 2015 at 3:40 pm #523053Hi!
Do you mind creating a temporary admin login and posting it here privately so we can look into it?
Best regards,
YigitOctober 22, 2015 at 4:51 pm #523120Ultimately I was able to get this working on my own. I replaced your line of code with…
add_shortcode('avia_search', 'pwm_append_search_nav'); function pwm_append_search_nav(){ return get_search_form( false ); }
…and inserted it into the phone field in Theme Options > Header. Then, I tinkered with the CSS quite a bit until I got it to display correctly. There was too much to put the details here. In the end, though, it’s working. I really appreciate your help.
Thanks!
kcm -
AuthorPosts
- The topic ‘Search form in #header_meta’ is closed to new replies.