Support » Plugins and Hacks » Where to put CSS?

  • Resolved jmanpa

    (@jmanpa)


    Where do I put custom CSS and how do I refer to it if I am creating a custom plugin?

    My plugin modifies adds visual elements to a blog post itself and everywhere I’ve stuffed the css, it works at runtime on the blog itself, but going into the admin interface causes errors in WordPress – “headers already sent” kinda stuff.

    Is there a best practices on where to add your own .css for a plugin so that it plays nice with WP? I’ve tried to put it in myplugin.php at the top before the PHP, in a separate css file, etc…

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ll answer my own question and pass it on:
    http://codex.wordpress.org/Function_Reference/wp_enqueue_style

    smartyd

    (@smartyd)

    Could you translate this to English? I have a css code that I can’t find a spot for either. It does work if I put it directly in the post, but I would like to house it elsewhere so I can call it up by any or all posts. Can you take a look at my site and give me some help? I tried putting the code (the “thumbnail” css you see in a couple of the posts) in the Stylesheet, but it doesn’t work.
    Much appreciated.
    Marty

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Where to put CSS?’ is closed to new replies.