Many probably didn’t notice, nor care, that WordPress turned 5 on the 27th of this month, but then, WordPress was pretty quiet about too. WordPress tips still abound however, and today’s tip comes courtesy of Lorelle on WordPress and deals with graphics stored away from the WP content directory.
Lorelle, who is arguably the Grand Dame of WordPress, suggests the following solution for locating graphics with your blog site.
By using a feature called
base hrefin theheadof yourheader.phptemplate file, you can establish the artificial “root” from which to look for file references. eg,base href=”http://example.com/”
This single command instructs a browser to treat the sites root directory as the default directory. Lorelle has other WordPress tips on offer including working with the template files.



Hmm, wouldn’t it affect other stuff of the blog driven by WP? Isn’t it dangerous to do this trick with an existing blog, I wonder?