• Resolved dtsinter

    (@dtsinter)


    Hi. First of all great plugin. One thing that makes me wonder, is the sorting by date last changed / submitted in the sitemap. For example in my sitemap the oldest entry for posts is on top, whilst the newest is at the end. Should it not be other way round. When a site grows, the newest should not be 56.999 entries at the end, difficult to detect for search engines and in worst case even after a page break…

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi, that is not expected behavior. I suspect another plugin or your theme changes the default post order…

    Are you capable and willing to edit plugin files? If so, could you please do the following test for me?

    1. First make sure to upgrade to XML Sitemap & Google News version 5.2
    2. Then go to Plugins > Plugin Editor and select XML Sitemap & Google News
    3. Browse (on the right) to find the file models/functions.public-sitemap.php and open that for editing
    4. Scroll down to line 430 where you see:

    
    $request['orderby'] = 'modified';
    

    and add on a new line:

    
    $request['order'] = 'DESC';
    

    and save.

    Check your post sitemap again and please let me know if the order has now reversed (back) to the most recent one on top. Note that it will be ordered by modification date which may not be the publication date.

    Hi, sorry to say we’re having some trouble with releasing 5.2 on WordPress repository (the SVN is refusing to sync with our Github repo) but you can find the latest release on https://github.com/RavanH/xml-sitemap-feed

    You’ll have to wait a bit longer for 5.2 to come out but it will already have the suggested modification so no need to edit anything ??

    Thread Starter dtsinter

    (@dtsinter)

    Dear Ravan,

    I just installed the new update of the plugin the normal way via WordPress and I can confirm that it works. The sorting is now back to latest published/modified on top.

    Thanks a lot.

    For your information I have a WordPress multisite installation and after using the “upgrade network” function in WordPress after the update all sites now behave the correct way.

    Well done and thanks a lot.

    Thanks for confirming ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sitemap Sorting: Why is last changed page, post not on top?’ is closed to new replies.