WordPress.org

Ready to get started?Download WordPress

Forums

  1. Jpyper
    Member
    Posted 1 year ago #

    Is there a way to set options for the entire network?

    In specific I want to set a certain post type to be excluded from the sitemap for all sites.

    http://wordpress.org/extend/plugins/bwp-google-xml-sitemaps/

  2. Khang Minh
    Member
    Plugin Author

    Posted 1 year ago #

    Currently you can't do that in the admin area. However, you can remove any post type you want for all sites using the Module API provided by the plugin. Please take a look at BWP GXS's documentation for more details.

  3. Jpyper
    Member
    Posted 1 year ago #

    I've been looking through the documentation.

    If my post type is called "slides", would I create a new module called post_slides and just return true for the generate_data function? I know I could use the bwp_gxs_post_where filter and just filter out all IDs of my post type, but it doesn't seem like a good way to go and I also want the sitemap for that post type excluded from the sitemapindex.

  4. Khang Minh
    Member
    Plugin Author

    Posted 1 year ago #

    No you don't have to create any new module. Try this:

    add_action('bwp_gxs_modules_built', 'bwp_gxs_remove_modules');
    function bwp_gxs_remove_modules()
    {
    global $bwp_gxs;
    $bwp_gxs->remove_module('post', 'slides');
    }

    Hope that helps.

  5. Jpyper
    Member
    Posted 1 year ago #

    That's perfect, thank you!

    I also turned off the "site" sitemap by using

    $bwp_gxs->remove_module('site');

    The site sitemap for the parent site of the network was displaying just one of the child sites, and I don't think it's necessary for me anyways.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags