[Resolved] Make submenus visible in sidebar

Home Forums Support [Resolved] Make submenus visible in sidebar

Home Forums Support Make submenus visible in sidebar

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1571015
    Jonathan

    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.

    #1571032
    Elvin
    Staff
    Customer Support

    Hi,

    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. 🙂

    #1571038
    Jonathan

    Perfect! 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.

    #1571042
    Elvin
    Staff
    Customer Support

    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.

    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. 🙂

    #1571052
    Jonathan

    That’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!

    #1571060
    Elvin
    Staff
    Customer Support

    That’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 );

    #1571422
    Jonathan

    Actually I found this CSS to work:

    }.main-navigation {
    display: none;

    But thanks for your suggestions.

    #1571501
    Jonathan

    Okay, 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.

    #1572132
    Elvin
    Staff
    Customer Support

    Try 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/

    #1572180
    Jonathan

    Bingo! Thanks so much!

    #1572209
    Elvin
    Staff
    Customer Support

    Bingo! Thanks so much!

    No problem. 🙂

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.