My First WP Plugin – Per Post CSS & JS
I’m new to this whole Blogging thing (which is evident by the current state of the site), so it’s with great pride that I’m unleashing my first WordPress plugin into the world!
Per Post CSS and JS
One of the main problems that i’ve had while setting up my site has been the inability to display my CSS and Javascript experiments from within the post — instead having to link to an external file.
“Per Post CSS and JS” simply grabs links to CSS and Javascript files from WP’s custom meta field’s and links them into the header of that specific post. This plugin is based on the PPS plugin by BlindMuse.
Including a custom CSS file with a post
- Add a custom field
- Set it’s key value to be
CSS - Set it’s value value to the path of my CSS file, e.g.
style.css
Including a custom Javascript file with a post
- Add a custom field
- Set it’s key value to be
JS - Set it’s value value to the path of my Javascript file, e.g.
myCode.js
About this entry
You’re currently reading “My First WP Plugin – Per Post CSS & JS,” an entry on Flog, written by Adam Burmister.
- Published:
- 17.05.05 @ 3pm
- Category:
- opensource, programming
No comments
Jump to comment form | comments rss [?] | trackback uri [?]