No Child Pages Body Class
-
I’m implementing a site where some of the subpages have a sub navigation and others don’t, here is a sample site map for instance…
Home
-About
–About Me
—What I do
—Who I am
–About You
-Why
-Portfolio
-Resources
-ContactThe design calls for a left sidebar for the nav and a right larger content area. If there is no subnav (in the case of “Why”, “Portfolio” etc.) the left sidebar goes away and the main content area expands to the full width of the rest of the sight. There are also faux columns in play here.
Because of all this I would ultimately like to just set a class of “no-sub-nav” on the body tag (in header.php). Being relatively new to using WordPress as a CMS I’m having trouble with this.
FYI: All of the pages are set up using pages to control content, I’ve set “Front page displays: A static page”. For now I’m just using a different template if it is a page without any child pages.
Any help is appreciated, thanks for your time.
- The topic ‘No Child Pages Body Class’ is closed to new replies.