-
AuthorPosts
-
January 4, 2019 at 10:08 pm #1050104
Hello everyone,
I am trying to place a search bar within the header, see the screen shot for the mock-up of what I am trying to create/style.
So far I have;
1. Activated header widget area in wp-content/themes/enfold/functions.php
2. Since I am using Logo Left, Menu Below, I used the following code snippet…//——————————–
// Header widget area for menu below
//——————————–
add_action( ‘ava_main_header’, ‘enfold_customization_header_widget_area’ );
function enfold_customization_header_widget_area() {
dynamic_sidebar( ‘header’ );
}3. The widget text is now within the header, BUT it is above the logo, rather than centered (to the right of the logo) as shown in my mock-up.
Could you tell me how I can style the search bar and/or widget to display as shown in my mock-up?
Thank You!.
January 5, 2019 at 12:41 pm #1050307Hey 34oldcat29,
Could you post a link to the page in question so that we can take a closer look please?
Best regards,
RikardJanuary 7, 2019 at 11:51 pm #1051086Sorry for the late reply, I didn’t see your reply.
Right now I have only White text in the widget so it is hidden unless you CTRL+A to see it.
I am trying to get this widget in the center of the page (to the right of the logo).
Any suggestions?Thank you!
- This reply was modified 5 years, 10 months ago by 34oldcat29.
January 9, 2019 at 4:23 pm #1051895Hi 34oldcat29,
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) { #header #text-7 { width: 55vw; float: right; padding: 0; top: 53px; } }
If you need further assistance please let us know.
Best regards,
VictoriaJanuary 9, 2019 at 7:22 pm #1052043ARG!! Now that the widet is in place I tried to add the search bar.
I meant to add the following to header.php, but accidentally added to functions.php. Now the site shows HTTP error 500.<form method=”get” id=”searchform” action=”<?php bloginfo(‘home’); ?>/”>
<div><input type=”text” size=”18″ value=”<?php echo wp_specialchars($s, 1); ?>” name=”s” id=”s” />
<input type=”submit” id=”searchsubmit” value=”Search” class=”btn” />
</div>
</form>I have since removed this code but site still non-functional. Any suggestions?
- This reply was modified 5 years, 10 months ago by 34oldcat29.
-
AuthorPosts
- The topic ‘Search Box in Header (Widget)’ is closed to new replies.