On the edit screen, under the Screen Options tab, enable the Scripts n Styles metabox 🙂
I really regret making the box hidden by default. I was hoping to avoid making the edit screen cluttered, by it just confuses people, sorry!
(A version in the future will have an admin-bar button that opens a modal interface instead of a metabox.)
Thread Starter
Mike
(@maddogmike)
Ah, got it now, thanks! One more question while I have you. So, I understand that I enter the scripts without the <script> tags, but how would I enter a script that pulls from an external source? Normally I would enter:
<script type="text/javascript" src="http://someapis.com/somescript.js"></script>
But since your plugin includes the script tags, is there any way to add an external script like this with your plugin?
Thanks again,
Mike
Use the feature called “Hoops” which creates a shortcode for embedding arbitrary html markup. You’ll end up with something like [hoops name="external-script"] that you’d then put into the post content. If you create the Hoops shortcode on the Settings Page tab, instead of a post edit screen, you can enable hoops in widgets, to use it in a sidebar if you’d like.
Note: you have to have unfiltered_html (editor or admin user) in order to create a Hoops shortcode, but any user who can use shortcodes will be able to use it.
Thread Starter
Mike
(@maddogmike)
Hoops is a cool feature, but I’m not sure it will help me here. In this case, I need the script loaded before the </head> tag, so I don’t think entering a hoops shortcode in the post content would accomplish that, would it?
Right now I have the script in my header.php file, which is fine, but I don’t really need it loaded on every page, so I was seeking a way to load it only where needed.