|
Posted on
09.29.07 by Widge @ 10:55 pm
Okay, so here's some fun. At Needcoffee, we pretty much draw from a single directory for images. But if you do the IMG quicktag by itself, all you get is it asking you for the full URL. That's no fun. How can you hardcode the img directory in there? Simple. 1. Go to wp-includes/js/ 2. Edit your quicktags.js 3. Look for this code (I've killed some tabs just to keep it from being too wide for the theme):
You'll notice that "http://images.needcoffee.com/" is set to pop up instead of just "http://". Obviously, you make that whatever you want it to be. Now you'll also notice that I've got a div class in there instead of just the standard img src code. Well, at Needcoffee, our images are always on the right side of the post (well, normally), so that's hardcoded as well to save me from having to put it in. Enjoy. P.S. You might need to shut down your browser and flush your machine's cache before the changes show up. So don't panic if it doesn't take effect immediately. Taggification: javascript, quicktags, Wordpress Filed under: Wordpress
|

John Robinson is a writer of prose, poetry and comics who also writes under
the pseudonym of Widgett Walls.
This is my latest book. Short stories written especially for you, or at least someone who reminded me a lot of you at the time.