Site logo

Archived topic

Inside-article

5 replies · Started by Mark on July 31, 2020

Viewing posts 1–6 of 6

I would like to change the .inside-article background color on my blog articles/archive/CTP pages only. Not on the home pages or any other pages. But I'm not able to override the default CSS, even putting into the customizer and child theme style sheet.

Hi there,

not sure what all the connotations are, so i would do this:

1. Create a new Hook Element.
https://docs.generatepress.com/article/hooks-element-overview/
2. Add this CSS styles:

<style>
.separate-containers .inside-article {
    background-color: #f00;
}
</style>

3. Select the WP_Head hook
4. Set your Display Rules to cover your needs.
Not sure if it is easier to select the Places you want it to display, or set to Entire Site and exclude it from the pages you don't want it.

Thanks, David! I just want that color change to be on the pages that display posts and CPT's.

If its only the archive pages - this should apply to all them whether it be a Post or CPT:

.archive.separate-containers .inside-article {
    background-color: #f00;
}

You can add that to wherever you normally add your CSS.

That worked! Thanks, David.

You're welcome

This archived topic is closed to new replies.