WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Google XML Sitemaps] Possibily for third party to hop on “addurl”

[Plugin: Google XML Sitemaps] Possibily for third party to hop on “addurl”

  • Hello,

    Writing a plugin which should basically add some pages for each page in the table (not third party pages). When the sm_buildup is called I can’t tell which pages were created in the sitemap and so can’t do my “mojo”.

    Either I am missing something, or I would appreciate if such a feature can be added (maybe as a new event)

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • signed.

    You already can (see documentation.txt) 🙂

    function your_pages() {
    	$generatorObject = &GoogleSitemapGenerator::GetInstance(); //Please note the "&" sign!
    	if($generatorObject!=null) $generatorObject->AddUrl("http://blog.uri/tags/hello/",time(),"daily",0.5);
      }
      add_action("sm_buildmap","your_pages");

    Hello,

    Just saw this reply now, this is not what I meant. (If it was, I guess I would avoid bothering you).

    What I meant is that your plugin creates a page list, and than creates a sitemap. Naturally the 3rd party pages are added too, with the sm_buildmap action, however they are unable to access the page list.

    Assume that my plugin is a one that creates a few pages from a single page. (you have example.org/page) and my plugin creates example.org/page/1 and example.org/page/2.

    My plugin does this for every page, so a good use of the sitemap plugin would be to add such pages to the map. The suggested callback does not really allow me to do that, rather just add a few pages. When iterating over the list of pages your plugin generates (and adding such pages) would have been helpful.

    Sorry for this long and complex message, I just hope I am understood this time. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Google XML Sitemaps] Possibily for third party to hop on “addurl”’ is closed to new replies.
Skip to toolbar