Persistent Styles Plugin

Have you ever updated your theme by replac­ing, or sim­ply over­writ­ing your old theme files? Well, when we edit themes we tend to add many cus­tom styles that are supra-theme. Maybe there are styles for a plu­gin (such as my Post Infor­ma­tion Plu­gin) that you want there regard­less of what theme you have selected. Well, I have the fix for you.

  1. Down­load the plugin
  2. Acti­vate
  3. Then your styles under Pre­sen­ta­tion » Per­sis­tent Styles.

I should warn you that the style sheet will be printed after your pri­mary sheet. I would advise on only adding non theme depen­dent styles, because it will throw off your CSS inheritance.

Have fun!

16 Comments

  1. Hey… good plu­gin. I’ve been using a seper­ate stylesheet with spe­cific styles with all my themes.

    Ajay on 02.06.07
  2. Thanks Ajay!

    Chris Poteet on 02.06.07
  3. When I down­load from your link, I get the Post Infor­ma­tion plu­gin, not the Per­sis­tent Styles plugin.

    Joe on 02.06.07
  4. Joe: Thanks. I fixed it.

    Chris Poteet on 02.06.07
  5. i don’t quite under­stand what to do with this. i’ve already made mod­i­fi­ca­tions to Sidebar.php, the Main Index Tem­plate, Sin­gle Page, and oth­ers. how do i use this?

    Enid on 02.07.07
  6. @Enid: This plu­gin is not for those pages. Here’s a sce­nario. Say you have a CSS style for some item in your side­bar, and you want it to remain regard­less of what theme you’re using. You used to have to find those styles in the theme CSS and trans­port them over. Now you can “set it and for­get it,” because the style sheet will be used regard­less of what theme you have. Make sense?

    Chris Poteet on 02.08.07
  7. I am try­ing to imple­ment this plu­gin with wpmu. that means some changes are needed, like:

    SORRY MY CODE GOT EDITED OUT HERE, I CAN MAIL YOU THE CHANGES

    some other stuff needs to be changed, I’ll mail you the whole thing when ready, but mean­while I need to fig­ure out how to auto­mat­i­cally cre­ate the persistent.css file in each users direc­tor :-) (the path I gave above)

    AND I am curi­ous if there are secu­rity issues involved? Could the user intro­duce php or javascrip or any­thing else that could be dan­ger­ous? How does the file get parsed?

    thx

    ovizii on 03.07.07
  8. Awe­some! Please do send me what­ever changes you come to. About auto­mat­i­cally cre­at­ing it…I’m not quite sure. Do you allow them in WPMU to edit the CSS?

    Drop me a line on the con­tact form, and we can work fur­ther on it.

    Chris Poteet on 03.08.07
  9. I dropped you “sev­eral lines” — hope they make sense to you :-) wait­ing for a reply — bye

    ovizii on 03.09.07
  10. Did you respond to ovizii’s ques­tions? I also use wpmu.

    Thanks, M.

    Martin Cleaver on 07.11.07
  11. @Martin: Yes, and his fin­ished work is
    doc­u­mented for down­load.

    Chris Poteet on 07.17.07
  12. Excel­lent plu­gin! Thanks.

    Fab on 10.11.07
  13. Sounds like it does exactly what MyCSS (http://www.channel-ai.com/blog/plugins/mycss/) does. No pun intended, but do we need two cus­tom CSS plu­g­ins for Word­Press that work inde­pen­dent of the used theme?

    Christoph Voigt on 11.06.07
  14. @Christoph: Yes, they do the same thing. I found out about that plu­gin after I did mine.

    Chris Poteet on 11.06.07
  15. very handy, thanks

    pcal on 03.26.08
  16. hi. Thanks for plugin

    per­fect.

    regards

    baron on 05.13.08

Got Something to Say?

(Required)
(Required)