Random writings on running, software & product development, business and anything else

Tag: XML

XML uploads in WordPress

By default the WordPress media uploader does not permit the uploading of XML files, but this is easily modified.

add_filter('upload_mimes', 'custom_upload_xml');

function custom_upload_xml($mimes) {
    $mimes = array_merge($mimes, array('xml' => 'application/xml'));
    return $mimes;

Add this in your themes functions.php file or in a plugin. The function name [custom_upload_xml] can be changed, but just make it consistent. The same technique can be used to allow other file types to be uploaded.

Common sitemap for major search engines

Its not often that Google, Yahoo and MSN agree on something, but it has happened, and it should make a webmasters life a little easier. For a while now Google has had Sitemaps where you give them the location of an XML file that allows them to better spider your site. Well Yahoo and MSN have joined in, and will work off the same file format.
See the sitemaps.org site for more details of file structures and an faq. I assume a number of the smaller search sites will jump onto this pretty quickly.

Google & Yahoo already accept the files, while MSN will be public sometime in 2007.

© 2024 Ernie Leseberg

Theme by Anders NorenUp ↑