removing secondary and tertiary sidebars from sub menu page

  • Unknown's avatar

    http://beerandcroissants.com/category/travel-with-me/asia/

    Hi

    Could I please ask for some assistance with generating code to remove the secondary and tertiary sidebars from my drop down menu “Asia” page. I have been able to do it for all other pages but unsure what this specific page is called to be able to replicate. I’ve left it “as is” so that you will be able to see my problem.

    thank you in advance.

    Kerri

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi Kerri, try this and let me know if it helps.

    /*****************************************
    Hide secondary and tertiary sidebars on Asia page.
    ******************************************/
    
    /* hide secondary and tertiary sidebars */
    .category-asia #secondary, .category-asia #tertiary {
      display: none;
    }
    
    /* Remove margin left, allows content to fill container */
    .category-asia #content {
      margin: 0;
    }

    WordPress assigns a CSS class for specific pages to the HTML body element. The body class for this page is .category-asia, so the
    .category-asia #secondary css rule will target an element with the ID of secondary, that is a child of .category-asia

    You can apply these rules across the whole site by removing the .category-asia selector, or you can target other pages the same way by right clicking the page, choosing inspect element, and finding out what the body class for a specific page is.

    Here’s an image of the body tag in my web tools – http://cl.ly/image/3Y1M3K3i202E

    Does this help?

    You can

  • Unknown's avatar

    Thank you so much. This worked perfectly. Thank you also for the body tag information, that’s what I was looking for but didn’t know how to. Greatly appreciated.

  • The topic ‘removing secondary and tertiary sidebars from sub menu page’ is closed to new replies.