WordPress.org

Forums

[resolved] Where to put CSS? (3 posts)

  1. jmanpa
    Member
    Posted 5 years ago #

    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...

  2. jmanpa
    Member
    Posted 5 years ago #

    I'll answer my own question and pass it on:
    http://codex.wordpress.org/Function_Reference/wp_enqueue_style

  3. smartyd
    Member
    Posted 4 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags