Archived topic
sticky menu bar for mobile and desktop
5 replies · Started by dassana on October 2, 2018
i am using a text header. i also have enabled sticky navigation menu for my website. for now its only the menu and search icon that is sticky.
i want the website text header title, navigation menu icon, search icon in one line OR website text title, navigation menu in one line and search icon below them. i tried the two ways mentioned in the forum, but they did not work and i removed the codes. all these three elements - website name, menu and search icon should be sticky both on a desktop and mobile. how i do go about enabling this feature.
thanks.
Best thing to do here is to use your navigation as your header: https://docs.generatepress.com/article/navigation-logo/#navigation-as-header
Then instead of using a navigation logo, you can use a function and some CSS to add the site title.
PHP: https://gist.github.com/generatepress/e41f0e0d083b4c2350ac772eb69479f1
CSS: https://gist.github.com/generatepress/9f99bbfa532ea4f9eafb6bd238b8cc9a
thanks tom. i did everything you have mentioned. unfortunately i am not a coder and i could not proceed further. the title, menu and search bar were all misaligned (extreme left) both in mobile and desktop. is there any way else i can get this feature done.
Do you have a staging site that I can see the issue on? I should be able to amend the code then :)
thanks tom. we will have to create a staging site. we do not have. so let it be. i do not have much time to spare to create the staging site etc. so i am giving up on this feature.
I'm hoping to add it in GPP 1.8 :)