hide some but not all dropdown menu items (5 posts)

  1. petleyjones
    Posted 4 years ago #


    I'm presently using a child theme of WPFolio and I have some menu items I'd like hidden at

    I've managed to hide the children in the drop down menu in my css by doing

    .children li a {

    but I was wondering if it was possible to also hide the drop down options under "Artist" (I want to hide 'contemporary', 'sculpture', 'historical') without also hiding the drop down option under "contact us"

    So in simple, I can't blanked hide all of my 'li' options because I'd still like some of the drop down menu functions to work.

    I've tried something like :

    .sfmenu ul li.page_item page-item-19 {
    to hide the aspects of the "Artist" menu item but it doesn't work.

    Anyone know if this is possible? Or if I have to do this as a function?


  2. Gary Darling
    Posted 4 years ago #

    Can you not simply remove those example menu items in the Appearance > Menus section of your admin backend? Click on the arrow to the right of 'contemporary', click Remove.

  3. petleyjones
    Posted 4 years ago #

    I'm not using the custom menu option in WP because I can't seem to format it the way I need to.

    This menu has been auto-sourced from the way my pages are constructed e.g. parent structure.

  4. Gary Darling
    Posted 4 years ago #

    OK. Well, this is a quick fix; your list items have classes that are more like id's, so add this css:

    li.page-item-203, li.page-item-209, li.page-item-211 {
  5. petleyjones
    Posted 4 years ago #

    awesome that worked! thanks :)

Topic Closed

This topic has been closed to new replies.

About this Topic