I’m trying to customize the framework.css for how high or low the sidebar appears on specific pages. Would it be possible to do this using a custom page template and a specific div class declaration? Such as creating a custom template and within that template creating a class to “override” the default css sidebar element settings for those pages? How would I go about doing this?
Leave a Reply
You must be logged in to post a comment.
One option is to make sure the theme is using the function
body_class()
inside the<body>
tag.When I select the page template Sidebar Template (
wp-content/themes/twenty-eleven/sidebar-page.php
), the classpage-template-sidebar-page-php
shows up in thebody
tag:According to brasofilo’s answer, every page has its own class, in case of brasofilo’s code, it is the page-id-674. It’s generated by wordpress in general.
If you want to do styling on specific pages, you may use something like this:
Hope that helps!