View Single Post
Old 04-16-2008, 01:41 AM   #1 (permalink)
DaHLiA
Contributing Member
 
DaHLiA's Avatar
 
Join Date: 10-26-06
Location: India
Posts: 120
iTrader: 1 / 100%
DaHLiA is liked by many
Send a message via Yahoo to DaHLiA
How to create sitemap for wordpress blog?

I tried Google XML Sitemap generator plug-in but it keeps giving me the error:

There was a problem while notifying Google. View result
There was a problem while notifying MSN.com. View result
There was a problem while notifying Ask.com. View result


When clicked on the view result link, it takes me to my blog's 404 page not found page!

So, i tried this another approach which I found via google.

1. Installed and activated RunPHP plug-in. Set the permission for Admin
2. Created a new Page via Wordpress admin panel and entered the below code

PHP Code:
<?php
global $wpdb;

$allposts $wpdb->get_results(”SELECT FROM wp_posts WHERE post_type=’post’ AND post_status=’publish’ ORDER BY post_date DESC”);

foreach(
$allposts as $ap) {
$perma get_permalink($ap->ID);
print 
<a href=” $perma >” $ap->post_title </a><br/>;
}

?>
Now my page's content area is blank.

Any idea how can I resolve this?
Thanks!
__________________
Cheers,
DaHLiA
___________________________________
My Virtual Shelter
“Knowing is not enough; we must apply. Willing is not enough; we must do.”

Last edited by DaHLiA; 04-16-2008 at 01:53 AM..
DaHLiA is offline   Reply With Quote