- This topic has 14 replies, 2 voices, and was last updated 3 years, 5 months ago by Leo.
-
AuthorPosts
-
October 24, 2020 at 2:55 pm #1502820moy
I have added a search box in secondary navigation with Code Snippets plugin with the help of the 2 links given below. But the secondary navigation is not working.
https://docs.generatepress.com/article/navigation-search/#use-navigation-search-in-secondary-navigation
https://docs.generatepress.com/article/adding-php/Secondary navigation is not visible plus. search option is still showing in the primary navigation. when I am clicking the search option in the primary navigation, it turned into a cross. but the search box is not visible.
Will you be able to help me out? I like to add a search box in secondary navigation.
October 24, 2020 at 5:26 pm #1502882LeoStaffCustomer SupportHi there,
Have you activated the secondary navigation first?
I’m not seeing it.
Let me know π
October 24, 2020 at 6:38 pm #1502923moyyes, I have activated secondary navigation first and then I added the snippet. most probably I did something wrong.
Here is the link to screenshots of snippet and secondary nav.. https://drive.google.com/drive/folders/1RCkAopjJpXxjT6t1f-21-aryzDX1csur?usp=sharing
October 24, 2020 at 6:42 pm #1502925LeoStaffCustomer SupportHmm I’m just not seeing it.
So you’ve created a menu and assigned it to the secondary navigation?
https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#setting-a-theme-locationOctober 25, 2020 at 10:42 am #1503753moyNo I didn’t create any menu, I just want to have the search bar on secondary navigation with search icon on the primary navigation. And I don’t want to have any menu on secondary navigation, as more options will make visitors confused.
similar to this site – https://www.thinkwithgoogle.com/
But for some reason, secondary navigation is not showing. I also tried creating a menu for the secondary navigation. but still, it is not visible.
here is the link for the screenshot – https://drive.google.com/file/d/1vVqsz2J8fhh27DNTsGruymt1LF1jHnjC/view?usp=sharing
October 25, 2020 at 11:43 am #1503792LeoStaffCustomer SupportCan you do this first?
https://www.screencast.com/t/PiB5jZ2woXklI’m not seeing the secondary navigation in the example site as well.
What if we just try this CSS with your current setup?
.navigation-search.nav-search-active { top: 100%; }
October 25, 2020 at 12:22 pm #1503837moyfooter.entry-meta {
display: none;
}I don’t know anything about coding…. do I need to add this on my site by after clicking f12(on windows)?
.navigation-search.nav-search-active {
top: 100%;
}I tried adding this in the CSS section on customization settings but nothing is happening..
October 25, 2020 at 12:29 pm #1503843moyI just tried disabling the PHP snippet. Now the search bar started working again.
Then after adding this
.navigation-search.nav-search-active {
top: 100%;
}It started working as I want. Now I don’t need secondary navigation anymore. So I disabled it.
October 25, 2020 at 12:48 pm #1503851LeoStaffCustomer SupportThe CSS here:
https://generatepress.com/forums/topic/secondary-navigation-search-box-not-working/#post-1503792Should be added using one of these methods:
Adding CSS: https://docs.generatepress.com/article/adding-css/It should give a similar effect as this site:
https://www.thinkwithgoogle.com/October 25, 2020 at 12:56 pm #1503860moyOkay, thank you very much it is working properly. and I disabled secondary navigation.
Is it possible to create a few tweaks?
AS my background is totally white. It is not visible enough. Is it possible to make it more visible with a box-shadow and a thin underline?
October 26, 2020 at 8:46 am #1504994LeoStaffCustomer SupportTry this:
.navigation-search input[type="search"] { -webkit-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75); -moz-box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75); box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75); }
October 26, 2020 at 10:15 am #1505092moyit is working. thank you very much leo….
i am curious about a thing. what is webkit box shadow & moz box shadow ? will you be able to tell me about it?
October 26, 2020 at 10:27 am #1505105LeoStaffCustomer SupportThose are just browser pre-fix for compatibility.
In my opinion, you don’t need them anymore π
October 26, 2020 at 10:36 am #1505118moyYeah, i dont need those…. i tried changing the value of webkit box shadow and moz box shadow, but nothing happend thats why i asked. well, thank you very much for your support.
October 26, 2020 at 10:39 am #1505120LeoStaffCustomer SupportNo problem π
-
AuthorPosts
- You must be logged in to reply to this topic.