63 responses to “Adding Custom Content Types to the Sitemap”

  1. Tweets that mention Adding Custom Content Types to the Sitemap -- Topsy.com

    [...] This post was mentioned on Twitter by Mark Sharp, GetupandRunning. GetupandRunning said: New post: Adding Custom Content Types to the Sitemap http://bit.ly/cUaFrA [...]

  2. Dennis Winter

    Thx for your work!

  3. mike

    Hi..Help!
    I don’t know if your fix will cover this error or not.
    Do you know how I fix this one?
    thanks in advance, mike

    Error loading stylesheet: A network error occured loading an XSLT stylesheet:http://www.mikewiservidz.com/wp-content/plugins/google-sitemap-generator/sitemap.xsl

  4. Alice

    I added the code to the end of my functions.php, but it didn’t work for me… I changed the word ‘page’ to match my post type name, but nothing happened… I rebuild the map, but it looks the same, nothing was added.

    Thanks for the effort, though.

  5. Alice

    You are awesome!!!

  6. Simon

    Thanks very much, this does a great job of adding the custom post types.

    I know this is intended to be just a temporary stopgap plugin, but just to advise other people that it does override the ‘excluded posts’ option.

    You can add the following line at line 58 (before the line with the ORDER BY in it) if this is important for you:

    $where.=” AND ID NOT IN (100,101,102)”;

    (replacing the numbers with your excluded post IDs of course)

  7. Pratik Sinha

    You can fetch all public post types using the below code snippet, so that you don’t have to run the guar_filter_posttypes at all.

     $args=array(
                          'public'   => true,
                          '_builtin' => false
                        );
                        $output = 'names'; // names or objects
                        $operator = 'and'; // 'and' or 'or'
                        $posttypes=get_post_types($args,$output,$operator); 
  8. David Alexander

    Great work Mark. Love this addition. Il keep my eye out for when its patched in case the two clash when its updated. Loving custom post types in general keep up the good work. Im trying to add scribe seo to the custom post types edit page, any thoughts?

  9. Peter

    Didn’t work for me :( my custom post types still don’t show up in the sitemap.

  10. Peter

    Looks like it might have been a refresh problem on my end. Checked out the XML just now and all my custom entries are now listed. Strange. Anyway, thanks for this plugin!

  11. Adding Custom Post Types to the Wordpress Google Sitemap Generator Plugin | johngadbois.com

    [...] found a patch here that uses an existing hook in the plugin and seems to work great so [...]

  12. Greg

    Mate you rock – Thanks for this

  13. Charles Neville

    Worked beautifully for me. I’d really love if it could also create entries in the sitemap for custom post type archives (based on the taxonomies applied to them). I’ve installed this plugin: http://www.cmurrayconsulting.com/software/wordpress-custom-post-type-archives/ which makes pages like http://www.site.com/movies/ work as well as http://www.site.com/movies/comedy/ – as well as http://www.site.com/movies/caddyshack/

    Thanks, Charles

  14. Dennis Madsen

    Hello,

    Thanks for this nice fix!

  15. Ray

    Hi Mark,

    I had been wondering for the last few days how I would be able to include my ‘Events’ Custom Post Types into my sitemaps. Well, thanks to your nifty little plugin I have an answer.

    Many thanks and all has worked beautifully for me.

    Regards,

    Ray

  16. Phil Derksen

    This plugin worked perfectly for a new WP site I’m setting up. Thanks!

  17. Prestashop Themes

    Hi, thanks for sharing. I have used it in my web, I made new wp custom object type for my code snippets.

  18. Peter

    Brilliant!

    Just built a new site with custom post types and this is a great interim solution. Worked first time for me.

    thanks!

    Peter

  19. kalyan

    Hi
    Thanks for this plugin. it worked for me. Nice work done.
    Thanks once again

  20. Renato Rezende

    Hello

    Thanks for this plugin, it solved my problem. Great job! … Thanks a lot for work …

    Renato Rezende

  21. used-book

    thanks and it worked for me.

    however, there is some small issue: for some post_types, the priority is 100%, some are 20%. seems small improvement needs to be done.

    Anyway, thanks again for the great work. if updates are out, appreciate if u can keep me posted!

    cheers,

  22. used-book

    hi,

    figured out the problem, your plugin is totally fine. i have overlooked sth.

    sorry about that. and i have give u credit at the wordpress forum: http://wordpress.org/support/topic/google-sitemap-generator-not-generating-all-posts?replies=4

    thanks!

  23. Tom G

    Thanks for this. It’s a massive help and saved us loads of time trying to fix this issue :)

  24. Edson

    If the URLs do not appear after activating the plugin, go to administration page XML sitemap generator and click “rebuild the sitemap manually”.

    Thanks.

  25. Brian

    I tried out this plugin, but it did not appear to resolve what I perceive to be a problem.

    Here is my sitemap:
    http://faithjohnstown.com/sitemap.xml

    Here is an example post I was hoping to get included here (from this page http://faithjohnstown.com/resources/sermon-search/):
    http://faithjohnstown.com/resources/sermon-search/?sermon_id=86

    I’m using the Sermon Search plugin for these posts. I’ve installed and activated the plugin plugin, and told Google XML Sitemaps v3.2.4 to manually rebuild the sitemap page.

    Any suggestions? Did I miss something?
    Thanks,
    Brian

  26. Brian

    Doh, ignore the extra “)” on the first sermon-search link. Should be:
    http://faithjohnstown.com/resources/sermon-search/

  27. Brian

    Mark,
    This probably explains why I can never get any Facebook sharing plugins to work properly with the sermon browser links either.
    Thank you for the suggestion, I’ll take a hack at it.
    Brian

  28. Brian

    Thank you for the direction. A friend of mine who’s more versed in php was able to help me get this working for our site. It isn’t a real pretty hack, but it will work for me.
    http://faithjohnstown.com/sitemap.xml

  29. Daniel Campo

    Thanks Mark! Your work is greatly appreciated.

  30. Carl Heaton

    I want to have your babies! Thank you so much for this.

    http://www.tutorialvideoz.com now has a sexy working sitemap thanks you to!

  31. FotoForward

    Thanks man, you’re live safer!
    Great addition to the plugin!!
    Keep it up.

    Greetings,
    FotoForward.nl

  32. Jaume Sala

    Thank you…. Hopefully Google Sitemps add your code!!!

  33. abosami

    wow great ..

    it is wonderful plugin ..

    I’m tring to solve the problem. but it was very easy when I use the plugin .. Thank you very very very much ^^

  34. Guib

    Thank you very much Mark ! Your plugin saves me a lot of time !

  35. Jason

    Hi all my custom post type posts seem to have a priority of 20%. Is there a way to fix this?

  36. Jason

    Oops, sorry fixed it. Had to raise the “minimum post priority” from .2.

  37. kumar

    Hi Mark,
    Thanks for your efforts, Finally google xml sitemap works with your plugin.
    Thanks for your efforts.

  38. Dave

    I installed the plugin but the link (XML Sitemap) in the settings menu does not appear. I tried accessing it by using the url wp-admin/options-general.php?page=google-sitemap-generator/sitemap.php but it said “You do not have sufficient permissions to access this page.” I’m running WordPress 3.1.

    Any ideas?

  39. Lepki

    Installed and works perfect!
    Thank you Goog for helping me find this
    Thank you Mark for this plugin
    Nice work!

  40. Koen

    Great! Exactly what i was looking for.. the searching was a lot harder than installing the solution :)

  41. Sonya Lynn

    Great fix! You saved the day! Thank you!

  42. Marco

    My sitemap dont show all pages before. Thanks it work fine.

  43. Snehan

    Hi Mark,

    I am getting the following error when I activate your plugin and try rebuilding the sitemap, I have over 500 custom posts, Would that be causing any problem??

    The last run didn’t finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more
    The last known memory usage of the script was 15.75MB, the limit of your server is 256M.
    The last known execution time of the script was 0.02 seconds, the limit of your server is 120 seconds.
    The script stopped around post number 4 (+/- 100)

Leave a Reply