Are the body classes automatically created or is there a way to define them?
BF 1.4 - Body classes
(7 posts) (4 voices)-
- ChuckPosted 1 year ago #
-
they are automatically created based on the content. you can change it with the body_class filter (it takes an array as parameter). It's probably time to create some developer documentation...
Posted 1 year ago # -
How would you recommend setting up the parameters so the body class is the same as the page name? For example, if you're on the "About" page the tag is <body class="about">
Also, should I make changes in dynamic-classes.php?
Posted 1 year ago # -
you don't have to set up anything, it's there already, go to the page and see the body classes present (with firebug).
page name: slug-about
page id: pageid-47example usage (hiding the about widget in the sidebar):
.slug-about #sidebar #bf-page-17 { display: none; }or to target a post in single view:
.singular.postid-20 .myclass {}or a category of posts in single view:
.s-category-design .myclass {}Posted 1 year ago # -
Excellent, thanks for the clarification.
Posted 1 year ago # -
Edit: NVM I figured it out. A developers guide would be incredible. :)
Posted 1 year ago #
Reply
You must log in to post.