Make some Styles loaded on specific page only?

Author Posts

kfedorov

I want to make several pages look like landing pages with lots of it’s own style and dont’want it to be present for other parts of the site.

Am I able to make some special styling that will be loaded only for this page as a separate file?


Sebastian

Hey,

Yes you can. You make selectors specific to a given page at the targeting stage. The following video shows how to do this:

https://screencast-o-matic.com/watch/cFVIX4olWj

Is that what you were after?

Cheers,
Sebastian


kfedorov

Sebastian, thanks, you gave the right answere for the wrong question 🙂

Not to be present = not being even loaded, that is why I wrote about separate file.
Like choosing page_id will bring another file like /wp-content/micro-themes/active-styles_pade_id.css or some similar behaviour


Sebastian

Ah I see, sorry I misunderstood. That isn’t possible right now, but it’s a high priority for the future. You will be able to assign MT folders to certain pages, or types of page (e.g. post category). But right now, all CSS is written to a single stylesheet:

/wp-content/micro-themes/active-styles.css

You would need to split this apart manually right now. But that would be a bit fiddly of course.

Cheers,
Sebastian


kfedorov

Got it!
Ok, so it’s better to store style for such a pages in different folder and everything will be fine in future 🙂


Sebastian

Yes, that would make your life easier when you can start assigning folders to specific pages. And it’s not a bad way to organise your selectors anyway 🙂

You must login or register to reply to this topic.