Viewing 15 replies - 1 through 15 (of 15 total)
  • Do you need to hide it just on the top level page, or on all subpages, too?

    If you need to hide it on all pages, then add this to the end of your child theme’s style.css file:

    #pages-2 {
       display: none;
    }

    If you need to hide it just on the 3Dprinting page, then add this to the end of your child theme’s style.css file instead:

    body.page-id-397 #pages-2 {
       display: none;
    }

    Thread Starter 3dPrintingrevolution

    (@3dprintingrevolution)

    Hello CrouchingBruin and thanks a lot for you kind suggestion
    I need to hide it on all pages,tried in all possible variations but nothing changes on
    Am I doing something wrong?

    This is how it looks now the style.css of the childpage in ftp

    /*
    Theme Name: Twenty Fourteen Child
    Theme URI: http://example.com/twenty-fourteen-child/
    Description: Twenty Fourteen Child Theme
    Author: John Doe
    Author URI: http://example.com
    Template: twentyfourteen
    Version: 1.0.0
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: twenty-fourteen-child
    #pages-2 {
    display: none;
    }
    /* =Theme customization starts here
    ————————————————————– */
    @import url(“/3Dprinting/wp-content/themes/twentyfourteen/style.css”);

    OK, when I said to copy the CSS rule to the end of your style.css file, I literally meant the very end. So it needs to go after the import statement. All of your custom CSS needs to come after the import statement so it will override any similar rules from the parent theme:

    /*
    Theme Name: Twenty Fourteen Child
    Theme URI: http://example.com/twenty-fourteen-child/
    Description: Twenty Fourteen Child Theme
    Author: John Doe
    Author URI: http://example.com
    Template: twentyfourteen
    Version: 1.0.0
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: twenty-fourteen-child
    */
    @import url("/3Dprinting/wp-content/themes/twentyfourteen/style.css"); 
    
    /* =Theme customization starts here
    -------------------------------------------------------------- */
    #pages-2 {
    display: none;
    }

    Thread Starter 3dPrintingrevolution

    (@3dprintingrevolution)

    Hello CrouchingBruin, I do not want to abuse of your patience…but I cut and pasted the same and nothing changed….

    /*
    Theme Name: Twenty Fourteen Child
    Theme URI: http://example.com/twenty-fourteen-child/
    Description: Twenty Fourteen Child Theme
    Author: John Doe
    Author URI: http://example.com
    Template: twentyfourteen
    Version: 1.0.0
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: twenty-fourteen-child
    */
    @import url(“/3Dprinting/wp-content/themes/twentyfourteen/style.css”);

    /* =Theme customization starts here
    ————————————————————– */
    #pages-2 {
    display: none;
    }

    Try clearing your browser’s cache. I just looked at it in IE, Chrome, and FireFox, and the Pages section is gone from the left sidebar.

    Thread Starter 3dPrintingrevolution

    (@3dprintingrevolution)

    Thanks CB: this was exactly the problem I was going to write about.
    On IE all pages disappeared while on Mozilla it is all the same (with main and subpages.

    However – and please forgive if I probably was not clear –
    but I want the top pages appearing (ex : ABOUT
    AEROSPACE,ARCHITECTURE,ART & SCULPTURE,AUTOMOTIVE,BIOTECH/MEDICAL
    BOOKS REVIEWS,)and just the subpages hidden (as – under BOOK REVIEWS
    3D cell culture
    3D Printing for Architects with MakerBot
    3D Printing for Dummies
    The Ultimate Guide to 3D Printing 2014

    Ah, OK, thanks for the clarification.

    Simple modification:

    #pages-2 ul.children {
     display: none;
    }

    Thread Starter 3dPrintingrevolution

    (@3dprintingrevolution)

    AMAZING: this worked and now there are just the Main pages…..

    Last question …if you do not hate me 🙂

    Is it possible to go on the MAIN PAGE with the mouse and to have the subpages coming out?

    Yes, it is possible, but involves writing some jQuery/Javascript code to handle mouse enters/exits on the menu items. I can see that your visitors will otherwise not have a way of accessing the subpages.

    Thread Starter 3dPrintingrevolution

    (@3dprintingrevolution)

    That is the issue at this point and all the subpages are impossible to be seen
    Any suggestion?

    PS MANY MANY thanks again

    Actually you may be able to do it with just CSS. Replace what I gave you earlier with this:

    #pages-2 li:hover ul {
      margin-left: 150px;
      position: absolute;
      margin-top: -20px;
      display: block;
      width: 100%;
      border: 1px solid white;
      padding: 5px;
      background-color: black;
    }
    
    #pages-2 li ul {
       display: none;
    }

    Thread Starter 3dPrintingrevolution

    (@3dprintingrevolution)

    Dear CrouchingBruin

    MANY MANY MANY MANY MANY THANKS !!!!!

    Now it is exactly how I wanted it to work: is there any place on WordPress where I can thank you publicly?

    Thank you very much again

    Giorgio

    Thread Starter 3dPrintingrevolution

    (@3dprintingrevolution)

    Dear CrouchingBruin,dear all

    Sorry to bother again on the main topic but I am trying to bring the level of subpages to a third level (example: Corporate Analysis -> A -> ARCAM) form the existing second one

    The CSS file looks like it is indicated in the end of the message….I tought that it was enough to substitue 2 with 3 , but evidently not . Any suggestions?

    Thanks a lot

    this (as you kindly indicated:
    /*
    Theme Name: Twenty Fourteen Child
    Theme URI: http://example.com/twenty-fourteen-child/
    Description: Twenty Fourteen Child Theme
    Author: John Doe
    Author URI: http://example.com
    Template: twentyfourteen
    Version: 1.0.0
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: twenty-fourteen-child
    */
    @import url(“/3Dprinting/wp-content/themes/twentyfourteen/style.css”);

    /* =Theme customization starts here
    ————————————————————– */
    #pages-2 li:hover ul {
    margin-left: 150px;
    position: absolute;
    margin-top: -20px;
    display: block;
    width: 100%;
    border: 1px solid white;
    padding: 5px;
    background-color: black;
    }
    #pages-2 li ul {
    display: none;
    }

    Wow, your menu has certainly grown, I actually see four levels of menus. Business must be good.

    Change the CSS so it looks like this:

    #pages-2  li:hover > ul
    , #pages-2  li ul li:hover > ul
    , #pages-2  li ul li ul li:hover > ul
    , #pages-2  li ul li ul li ul li:hover > ul
    {
      margin-left: 120px;
      position: absolute;
      margin-top: -20px;
      display: block;
      width: 100%;
      border: 1px solid white;
      padding: 5px;
      background-color: black;
    }
    #pages-2 li ul {
       display: none;
    }

    Each line in the selector of the first rule refers to a different menu level.

    Thread Starter 3dPrintingrevolution

    (@3dprintingrevolution)

    You are amazing: thanks a lot again

    As I said before…is there a place where I can thank you publicly?

    All the best for your temple as well

    Thanks a lot!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Twenty Fourteen- how to hide left menu subpages?’ is closed to new replies.