Archived topic
Page specific styling don't work if the page is selected as posts page
7 replies · Started by Dalibor on July 29, 2022
I've tried various solutions from Simple CSS, to HFCM and page-specific additional CSS- nothing works.
If I try to style a specific page, that is selected as a posts page (settings/reading), NONE of the CSS changes will be applied to the page.
When I replace that specific page with another (dummy page) on the settings/reading as a post page, the styling changes are immediately live and visible.
I believe that I had a similar issue with the 'shop' page in the past (on another website).
As I don't like my solution of replacing the page with a 'dummy' page, I'd like to get to the bottom of this.
Edit: It has nothing to do with code overrides (!important), the CSS changes are not visible at all in a dev console.
To have a better understanding of the issue, may you kindly provide the link to the page in question?
You may use the private information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Sure, pages linked.
Hi there,
the page that is set to display your latest posts ( a.k.a the Blog ) is not a normal page. WordPress ignores any Meta Boxes in the editor for that page, including Simple CSS.
So that CSS would need to go in your Simple CSS that is accessible from the dasboard.
And to target just the blog page you can use the .blog selector.
eg.
.blog .footer-widgets {
/* your blog page footer widget styles */
}
Hi David,
I've tried that, the result is the same. No changes to the 'blog' page or the code.
https://prnt.sc/qho1kR7tjnC9
You need to add the CSS in Appearance > Simple CSS or in the Customizer > Simple CSS.
That worked, thanks.
You're welcome