WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am building a wordpress plugin that needs to allow the admin to upload CSS documents, and attach thumbnails.

I want to know if there are any methods within wordpress that would be useful in assisting me in building an admin page that allows upload and deletion of css documents and images.

share|improve this question
up vote 2 down vote accepted

You can use the file uploader that come with Wordpress, using this guide to insert it in your meta-box:


You can create some custom fields and use it to upload thumbnails or CSS to your server.

share|improve this answer

Alternatively, you can treat your CSS uploads just like any other attachments and use the attachment manager for that. For instance, introduce a custom post type called 'Stylesheets' and replace the thumbnail image metabox with a more generic file upload metabox on those.

Then you have not only an uploader, but complete management of your stylesheets including metadata, and you can easily reference them via post records wherever you want to further process them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.