WordPress.org

Ready to get started?Download WordPress

Forums

Google XML Sitemap for Images
Feature: Generate by post modified date (6 posts)

  1. Ricard Torres
    Member
    Posted 1 year ago #

    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/

  2. sadhaka
    Member
    Posted 1 year ago #

    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.

  3. Ricard Torres
    Member
    Posted 1 year ago #

    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 :)

  4. sadhaka
    Member
    Posted 1 year ago #

    BTW - I notice that the plugin seems to list images that are no longer associated with posts, but - meh.

  5. Ricard Torres
    Member
    Posted 1 year ago #

    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.

  6. sadhaka
    Member
    Posted 1 year ago #

    They're not "bad" syntactically, just "bad" as in you don't really want them there! Need to look at the sql query sometime..

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.