Variant of the same theme for each page

I have a wp site with seven books, each book has a page, and each page will have the same structure, but differents style ( Each book has his own color guide).

So, what I need is apply a different variant of the same theme for each page...

Is it posible? How should I do it?

Solutions

The simplest would be to add it to a CSS style.

WP output body classes, which allow to precisely target any specific page with CSS by ID, for example:

<body class="page page-id-7 page-template-default logged-in admin-bar no-customize-support group-blog no-sidebar">

While it's not default I also like to hook into it and add page-[name] class for myself.

If your theme is custom you can just work styling into it. If you are using off the shelf theme you should probably create a child theme for it and implement custom styles there.

Tags: Themes

Similar questions

How can I maintain a Structured URL whilst generating the flatter `/product-name/` variant as well?
I am creating an eCommerce website, powered by WordPress, with WooCommerce powering the shopping functionality. The website will have many Products; likely to fit multiple Product Categories. As such, typical URL structures, will be: The above URL structure follows a Hierarchy; something I wish to keep for both User Experience and Search Engine Opt...
Variable product with main price and add variant price to main regular price
Is it possible for a Variable product act as a simple product with a regular price and when a variant is selected then the variant price will be added to the main price?
How to bypass CSS Font-Variant-Ligatures?
on my wordpress website theme, there is a CSS property (font-variant-ligatures) by default added that I cannot find and remove but I need to disable or bypass this property using any other css file with !important. Actully, this property is creating chaos in my font that font characters gets smashed in each other. When I turn off this CSS property ...
Unable to get functionality to work to disable out of stock product variant with sold out message
In my functions.php, I am trying to add a sold out message in the drop down menu for my product variants. So for example if I have shirt that has variants of small, medium and large and the large is out of stock, in the drop down menu the user should see the large option is disabled and contains a sold out message next to 'Large'. The other variant...
Remove Component/Variant in Order Invoice PDF in Woocommerce
I Hope are you okay. Today I have problems with I open order invoice pdf in admin after products list have components. I Remove all components as well I am using woocommerce-pdf-invoices-packing-slips plugin. Below is my product URL : https://www.pcguru.lt/produktas/amd-home-guru/ My Invoice PDF screenshot as well. How can I remove it?
How to add posts in the home page same as blog page with me selecting static page for each?
I'm new to WordPress, and I've created a custom template, I'm facing a problem when I try to fetch the posts to the front page (homepage). In (dashboard->Reading) I set my homepage displays as a Static page and selected Home page as (home) and Post page as (posts). In the index.php the code that's showing the posts in Posts page is : It works fine ...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.