- This topic has 10 replies, 2 voices, and was last updated 3 years, 4 months ago by Elvin.
-
AuthorPosts
-
December 7, 2020 at 5:54 pm #1571015Jonathan
I found several threads about this but none of the custom CSS provided worked for me.
I simply want the submenus always visible on this page, not an arrow with a dropdown: http://www.shininglightpublications.com/
Right underneath is another menu from the sidebar widget, which shows exactly what I want–the two items indented beneath the main menu item. I would just use that one, except I don’t know how to custom format a particular widget, and the menu needs to be bigger and bolder than the rest of the sidebar.
Thanks for any help.
December 7, 2020 at 6:15 pm #1571032ElvinStaffCustomer SupportHi,
Right underneath is another menu from the sidebar widget, which shows exactly what I want–the two items indented beneath the main menu item. I would just use that one, except I don’t know how to custom format a particular widget, and the menu needs to be bigger and bolder than the rest of the sidebar.
We can use this instead of the other one with the arrow.
We can style this particular widget with this CSS:
aside#nav_menu-4 li a { font-size: 20px; font-weight: bold; line-height: 2em; }
You can play around with the values of the properties and add more if you need to. 🙂
December 7, 2020 at 6:37 pm #1571038JonathanPerfect! Thanks so much! That was quick.
But I do have one more question. Now I can’t seem to get rid of the primary one. Under layout – primary navigation I set location to “no navigation” and it’s still there. I know I’ve don’t this before but am drawing a blank.
December 7, 2020 at 6:48 pm #1571042ElvinStaffCustomer SupportBut I do have one more question. Now I can’t seem to get rid of the primary one. Under layout – primary navigation I set location to “no navigation” and it’s still there. I know I’ve don’t this before but am drawing a blank.
Since it is added as a right sidebar widget, go to Appearance > Widgets and check the Right Sidebar area.
Remove it from there so it’s completely removed from that part of the page. 🙂
December 7, 2020 at 7:18 pm #1571052JonathanThat’s the menu I’m keeping! The one above it is the primary menu I need to get rid of. Originally it was designated in the right sidebar, but I changed that to “no navigation” and it’s still in the right sidebar!
December 7, 2020 at 7:39 pm #1571060ElvinStaffCustomer SupportThat’s the menu I’m keeping! The one above it is the primary menu I need to get rid of. Originally it was designated in the right sidebar, but I changed that to “no navigation” and it’s still in the right sidebar!
Ah if its not there along with the other widgets then perhaps it may be added in by a plugin, a PHP snippet or an actual code added within the sidebar.php template.The duplicate nav menu is added inside a div with class “gen-sidebar-nav”. Perhaps you’ve used some sort of a PHP snippet or plugin that added it in?Edit:
Its something added w/add_action( 'generate_before_right_sidebar_content', 'generate_add_navigation_before_right_sidebar', 5 );
Which can be removed by PHP snippet
remove_action( 'generate_before_right_sidebar_content', 'generate_add_navigation_before_right_sidebar', 5 );
December 8, 2020 at 4:03 am #1571422JonathanActually I found this CSS to work:
}.main-navigation {
display: none;But thanks for your suggestions.
December 8, 2020 at 5:32 am #1571501JonathanOkay, I still can’t do what I need to. The CSS I generated works fine, but now the menu doesn’t show in mobile either, where I want it, since the sidebar is down below the content on mobile.
Both primary and secondary navigation are set to “no navigation.”
The display location for the menu itself is set ONLY to “Off Canvas Menu.” Then under widgets it’s selected for the right sidebar.
So why does the additional menu keep appearing in the sidebar?
It the problem is easier to solve, is there a way for the CSS above to apply only to desktop?
Thanks for persevering with me.
December 8, 2020 at 3:02 pm #1572132ElvinStaffCustomer SupportTry this instead:
.inside-right-sidebar > .gen-sidebar-nav{ display:none; }
This specifically selects and hides the nav inside the right sidebar.
Note: This only hides the menu on the sidebar, it’s still inside the DOM structure when the page loads. If you want to completely remove it from the DOM structure, use the remove_action PHP snippet on my previous reply.
Here’s how to add PHP snippets. https://docs.generatepress.com/article/adding-php/
December 8, 2020 at 5:05 pm #1572180JonathanBingo! Thanks so much!
December 8, 2020 at 6:11 pm #1572209ElvinStaffCustomer SupportBingo! Thanks so much!
No problem. 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.