resimlerinizi galeri gibi ayrı sayfalarda görüntülediğiniz bir siteniz varsa bu işinizi görecektir
kendim için yazdım vatandaş yararlansın
<?php
include('wp-config.php');
header("Content-type: text/xml\n\n");
echo"<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:image=\"http://www.google.com/schemas/sitemap-image/1.1\">";
?>
<?php
$imal=mysql_query("select * from wp_postmeta where meta_key='_wp_attached_file' order by meta_id DESC LIMIT 5000");
while ( $ver = mysql_fetch_array($imal) )
{
$imgurl=$ver['meta_value'];
$kid=$ver['post_id'];
?>
<url>
<loc>http://xxx.com/?attachment_id=<? echo $kid; ?></loc>
<image:image>
<image:loc>http://xxxx.com/wp-content/uploads/<? echo $imgurl; ?></image:loc>
</image:image>
</url>
<?
}
echo "</urlset>";
?>xxxx.com yerine sitenizi yazıp imagemap.php seklinde kaydedin ve wordpress kurulu ana dizine atın.
Misafir adlı üyeden alıntı:
mesajı görüntüle