Custom CSS Class Per Page

How do I add a custom CSS class to the body element of a page to apply specific CSS to that page?

Comments

  • Hi,
    There is no option to apply custom css to the body tag, each page has a custom class added with the id of the page, like here: http://prntscr.com/ffdatq
    As you can see, this page has the class .page-id-92
    thanks
  • It would be more convenient if I could add an extra class to the body tag such as white-bg, pink-bg depending on whether I want that page to have my white BG styles or my pink BG styles. Also, it would be best to allow multiple extra class names. Would this be possible to add in a future update?
  • We do not think so, since there are many classes added to the body tag and users could name their custom classes with the same names. This would be very problematic.
    You can always edit the theme files and add your custom class directly into the code, since this is a custom theme files modification we cannot support it.

Sign In or Register to comment.