Description

With this plugin, you will be able to include certain CSS or JS files in only selected posts, pages, or other post types, instead of including them everywhere. You can also edit inline CSS & JS and include CSS & JS files from anywhere on specific posts and pages.

It places meta boxes in the WordPress post editor so it’s easy to select which files you want to include with the post you’re currently editing. This plugin works well for all websites, large and small, and it works well with WordPress multi-site (WordPress MU). Tested up to 3.1 beta 2.

See this plugin’s page on my website for information/comments/questions. I am open to the idea of suggestions and patches to this plugin! If you enjoyed this plugin, please donate or say thanks.

Todo:

Add a “remove references” button on the options page so people can remove file references without having to delete the file.

Screenshots

This is the plugin options page for Specific Files. It is used for uploading new files (you can also upload via FTP), viewing files, and deleting files.

The two meta boxes appear on the right side near the bottom. They use a multiple-selectable <select> element for easy selecting.

Advanced options include inserting inline CSS & JS into the header of your page or post.

Advanced options also include the ability to include your CSS & JS files from anywhere.

Installation

Upload /specific-files-for-posts-and-pages/ to the /wp-content/plugins/ directory.

Activate the plugin through the Plugins menu in WordPress.

Upload your CSS files to /wp-content/specific-files/css/ directory.

Upload your JS files to /wp-content/specific-files/js/ directory.

Use the meta boxes in the WordPress post editor to select the CSS and JS files that you wish to include.

FAQ

When you delete one of your CSS or JS files with your FTP client, the plugin won’t automatically remove all references to that file (in case you were simply deleting to reupload it again or some other case. It tries to preserve the calls to your files. In order to remove these calls, use the plugin’s options page. Using the delete button on the plugin’s options page will remove the file and all references to that file in your posts and pages.

Contributors & Developers

“Specific Files” is open source software. The following people have contributed to this plugin.