I’m just starting to learn wordpress, php etc, so please be gentle and assume I know nada, especially about using wordpress.
I am, however, pretty expert with xhtml and css. I’m trying to rebuild my site using wp. My site is css-layout, very few graphics, etc.
I really need to know how I can dynamically set the body tag’s id.
In a site where elements are part of includes, I can just change the body tag’s id. But, of course, my body tag is now a part of my header.php and I cannot make individual changes. I’m not worried too much about all the page, just some of them – like home, about (Pages)
The only solution I see is to modify the header.php to stop just before the body, and put that tag into the index.php, page.php, home.php files and make separate ones for each “section” or individual “static” Page.
Does that sound correct? (I hate to as I just got my layout working finally!)
Or, should I set up all the pertinent links in a file, include it, and make different versions to include that would incorporate the “selected” id on the particular link so that it uses the selected style?
All in all, neither idea sound all that efficient. Is there another way to just somehow pass a parameter that sets the body tag’s id? <body id=””>
Does anyone have other ideas?
- The topic ‘a way to set an id on the body tag (in header.php)’ is closed to new replies.