Hello,
I am using your sitemap plugin.
The pages which were once there, but are now moved to trash also are seen in the sitemap.
Will you please tell how to correct this?
Best wishes,
Dr. Ashok Koparday
]]>Replace the following lines in function get_page_count
//global $wpdb;
//$parsed_sql = explode('LIMIT', $sql);
//$query_count = $wpdb->get_results($parsed_sql[0], OBJECT);
with this
$total_published = wp_count_posts()->publish;
return ($total_published/$post_count);
The caveat is that this will only work if you are using “posts” only option. But this will greatly speed up the sitemap generation especially for large number of posts.
Great plugin! Keep up the good work!
]]>Great plugin, thanks! Just a quick note about a bug I noticed. In my theme i have an “edit page” link ( edit_post_link(); ) below the the_content(). On my sitemap page, the edit link has the postID of the last post from the sitemap.
I fixed the plugin by adding to wp-sitemap.php
$original_post = $post; //add after global $paged; on line 52
—
//add after line 117 to restore original post
$post = $original_post;
setup_postdata($post);
Hope this helps!
]]>The ‘[wp_sitemap]’ by itself works, but when I started to add parameters, it will go haywire.
The parameter ‘pages’ works.
The parameter ‘sort_column’, if used, will cause an empty page.
The parameter ‘post_count’, if used, will cause the error:-
Warning: Division by zero in /<pat to wordpress installation>/wp-content/plugins/wp-sitemap/wp-sitemap.php on line 23
Haven’t tried the other parameters, mainly because I have no need for them.
]]>