- This topic has 19 replies, 4 voices, and was last updated 4 years, 3 months ago by
David.
-
AuthorPosts
-
November 14, 2021 at 8:57 am #2004074
Andrew
I’ve added the secondary menu to the sidebar but it’s not showing the title. It does on mobile but not desktop.
I’ve tried adding the title separately as a widget or hook but even using the before_left_sidebar_content hook it appears after it.
Thanks.
November 14, 2021 at 1:13 pm #2004220Ying
StaffCustomer SupportHi Andrew,
Try add this CSS:
.inside-left-sidebar button.menu-toggle.secondary-menu-toggle { display: block; }Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know 🙂
November 14, 2021 at 3:31 pm #2004285Andrew
Thanks! That works but it also includes the menu link on desktop and it goes a bit odd if you click the link. Is there a way to make it not be a link on desktop?
And is there a way to have the menu be expanded by default?
November 14, 2021 at 3:54 pm #2004293Ying
StaffCustomer SupportTry this:
@media (min-width: 769px) { .inside-left-sidebar button.menu-toggle.secondary-menu-toggle { pointer-events: none; } }November 14, 2021 at 4:02 pm #2004297Andrew
Amazing, thanks, that worked.
And is there a way to have the menu all expanded by default?
November 14, 2021 at 5:14 pm #2004329Ying
StaffCustomer SupportTry add this CSS as well:
@media (max-width: 768px) { .inside-left-sidebar .secondary-navigation .main-nav>ul { display: block; } .secondary-navigation .inside-navigation > * { width: 100%; } }Let me know 🙂
November 15, 2021 at 12:19 am #2004470Andrew
Unfortunately that hasn’t worked. The menu items all start closed whereas I’m after the menu items to all be expanded by default, if that makes sense?
November 15, 2021 at 1:11 am #2004501Elvin
StaffCustomer SupportHi Andrew,
Are you trying to make the submenu items expanded as well? Like this? https://share.getcloudapp.com/xQujxm0W
If that’s the case, try this CSS:
@media (max-width:768px){ .dropdown-click #secondary-navigation.secondary-navigation ul ul { visibility: visible; } #secondary-navigation.secondary-navigation ul ul { position: relative; left: initial; opacity: 1; pointer-events: initial; height: auto; } #secondary-navigation .menu-item-has-children .dropdown-menu-toggle { display: none; } }November 15, 2021 at 1:50 am #2004523Andrew
That’s the one! Sorry my description was so bad 😂
All sorted now – Thanks both.
November 15, 2021 at 4:28 pm #2005651Elvin
StaffCustomer SupportNo problem. Glad you got it sorted. 😀
December 10, 2021 at 2:52 am #2044503Andrew
Slight issue with this if you could take a look that would be much appreciated.
The first thing is the pointer events works for mobile but not for iPad/tablet. How can I disable the pointer events for tablet without affecting desktop?
The other thing is the sidebar goes above the sticky header. I’ve tried playing with the z-index of the sidebar but am not having much luck?
Thanks.
December 10, 2021 at 4:54 am #2044600David
StaffCustomer SupportHi there,
in Elvins CSS change this line:
@media (max-width:768px) {to:
@media (max-width:1024px) and (pointer: coarse) {This should cover any touch enabled devices up to 1024px in size.
December 10, 2021 at 7:56 am #2044869Andrew
That’s done the trick – Thanks!
Any luck with the sidebar going above the sticky header?
December 10, 2021 at 8:42 am #2044936David
StaffCustomer SupportTry this CSS:
#mobile-header { z-index: 1000000 !important; }December 10, 2021 at 8:52 am #2044952Andrew
Unfortunately doesn’t seem to do anything!
-
AuthorPosts
- You must be logged in to reply to this topic.