Adding Search Bar to Main Menu in Expound
-
Hi All,
Very much appreciate all the help I’ve received so far. Revisiting this topic:
Thanks to @thesacredpath, I’ve added the search bar to the nav menu. However, I’m having problems hiding the sidebar search widget on all pages except the front page, I think because I’ve already hidden the sidebar to get the genericons (Facebook and Twitter) to show up on the nav bar. Here is the code I have now re: hiding the social media widget:
#wpcom_social_media_icons_widget-2 {
display: none;
}
.single #secondary {
display: none;
}.single #primary {
width: 100%;
}.single .site-content article, .single .comments-area {
padding-right: 40px;
}
.page #secondary {
display: none;
}.page #primary {
width: 100%;
}.page .site-content article, .page .comments-area {
padding-right: 40px;
}.archive #secondary {
display: none;
}.archive #primary {
width: 100%;
}.archive .site-content article, .archive .comments-area {
padding-right: 40px;
}.search-results #secondary {
display: none;
}.search-results #primary {
width: 100%;
}.search-results .site-content article, .archive .comments-area {
padding-right: 40px;
}I know I need to hide the sidebar search widget and social media widget only, as opposed to the whole #secondary, but I can’t quite figure that out.
Thanks,
Kelly
The blog I need help with is: (visible only to logged in users)
-
You can use Widget Visibility to control where widgets are displayed. See if that doesn’t get you want you are wanting.
-
Yes, all the widgets are set to front page only, except the social media and search widgets, which I need to load on all pages and then hide with CSS.
-
This is going to be a challenge given that you have hidden the #secondary (sidebar) on pages with CSS. When that is done, all the child elements within #secondary are hidden as well and can’t be brought back with CSS. This is going to take some thinking and testing.
-
Well, if I replace #secondary with #wpcom_social_media_icons_widget-2, like so…
.single #secondary {
display: none;
}.single #primary {
width: 100%;
}.single .site-content article, .single .comments-area {
padding-right: 40px;
}.single #wpcom_social_media_icons_widget-2 {
display: none;
}.single #primary {
width: 100%;
}.single .site-content article, .single .comments-area {
padding-right: 40px;
}… the search bar shows up on the post page, and the sidebar is hidden except for a small section beneath the comments area. I can’t figure out how to remove that small section. I set all the widgets to front page only, just to test, but the section is still there.
You can see it on this post:
-
You can set the background to “none” for .single #secondary by adding the following rule to your custom CSS.
.single #secondary { background: none; } -
Sorry about the delayed response. That cleared it, and the search bar seems to be working on all pages. Thanks!
-
- The topic ‘Adding Search Bar to Main Menu in Expound’ is closed to new replies.