Title: Feature: Generate by post modified date
Last modified: August 20, 2016

---

# Feature: Generate by post modified date

 *  [Ricard Torres](https://wordpress.org/support/users/quicoto/)
 * (@quicoto)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/feature-generate-by-post-modified-date/)
 * Hi there,
 * First of all let me say the plugin is great.
 * 1) I wondered if it’d be better to generate the XML ordering the posts by modified
   date.
 * Wouldn’t then Google index the newer faster?
 * Cheers
 * [http://wordpress.org/extend/plugins/google-image-sitemap/](http://wordpress.org/extend/plugins/google-image-sitemap/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [sadhaka](https://wordpress.org/support/users/sadhaka/)
 * (@sadhaka)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/feature-generate-by-post-modified-date/#post-3571537)
 * You can do this by editing the plugin. In the function image_sitemap_loop(),
 * wp-content/plugins/google-image-sitemap/image-sitemap.php
 * insert:
 * `ORDER BY id DESC`
 * … just before the closing of the SQL query `");`
 * I edited the plugin directly by FTP.
 * Seems to work. Now the latest posts are the first to be listed in the XML file,
   though I’m not sure if this would make any difference to Google.
 *  Thread Starter [Ricard Torres](https://wordpress.org/support/users/quicoto/)
 * (@quicoto)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/feature-generate-by-post-modified-date/#post-3571538)
 * Hey,
 * Thanks for the tip.
 * I finally added the order by, it works. Like you said, I don’t think it will 
   make much difference but now makes more sense. The newer at the top 🙂
 *  [sadhaka](https://wordpress.org/support/users/sadhaka/)
 * (@sadhaka)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/feature-generate-by-post-modified-date/#post-3571539)
 * BTW – I notice that the plugin seems to list images that are no longer associated
   with posts, but – meh.
 *  Thread Starter [Ricard Torres](https://wordpress.org/support/users/quicoto/)
 * (@quicoto)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/feature-generate-by-post-modified-date/#post-3571540)
 * I did notice that and I’ve tried to add some conditions in the query, no luck.
 * Eventually I’ve re-generated the XML and those bad links were gone, weird stuff
   😕
 * You can test the sitemap before and after adding it to Google Webmaster Tools
   to see if there’s any errors.
 * Cheers.
 *  [sadhaka](https://wordpress.org/support/users/sadhaka/)
 * (@sadhaka)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/feature-generate-by-post-modified-date/#post-3571541)
 * They’re not “bad” syntactically, just “bad” as in you don’t really want them 
   there! Need to look at the sql query sometime..

Viewing 5 replies - 1 through 5 (of 5 total)

 The topic ‘Feature: Generate by post modified date’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/google-image-sitemap.svg)
 * [Google XML Sitemap for Images](https://wordpress.org/plugins/google-image-sitemap/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-image-sitemap/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-image-sitemap/)
 * [Active Topics](https://wordpress.org/support/plugin/google-image-sitemap/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-image-sitemap/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-image-sitemap/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [sadhaka](https://wordpress.org/support/users/sadhaka/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/feature-generate-by-post-modified-date/#post-3571541)
 * Status: not a support question