How to properly redefine main theme css styles, only in one page
-
I have a WP website: after reading docs everywhere, I made up a little, personal plugin that lets me display a particular app, made with
VueJS
, into a single Page.The theme of this website is a commercial one.
I red I can add my styles using
wp_enqueue_style
: my idea was to override some of the theme styles, but in the docs I foundwp_enqueue_style
:Registers the style if source provided (does NOT overwrite) and enqueues.
So, it looks like I can’t use this method to overwrite the current style (default theme) of the website: moreover, I tried too, and, while completely new css works, if you redefine rules, it doesn’t work, maybe because the custom css is not guaranteed to be inserted after the theme style css.
I red some docs about child-themes but they don’t answer my question: I want the overwritten CSS only work in a particular page, NOT the entire website, that is my rules should only work in one page, redefining SOME of the classes in the main CSS.
How to properly add my styles if I want to overwrite the style of the website only in one page?
- The topic ‘How to properly redefine main theme css styles, only in one page’ is closed to new replies.