css with body class
-
Hi I added: <body <?php body_class(‘myclass’); ?>> and added .myclass #divname to my style.css and it works great and changes css for a page called state-page. My question is I have about 45 pages with the same “state-page” template I want the .myclass added to. Is there a way to declare this page as a catagory or something similar so WordPress will know that I want .myclass added through body_class to those pages?
I would like to acheive this alternate css through the body_class as I have other pages with different css and this is the best solution for my needs.
thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘css with body class’ is closed to new replies.