get_url_list example

$provider = $this->registry->get_provider( $sitemap );

        if ( ! $provider ) {
            return;
        }

        if ( empty( $paged ) ) {
            $paged = 1;
        }

        $url_list = $provider->get_url_list( $paged$object_subtype );

        // Force a 404 and bail early if no URLs are present.         if ( empty( $url_list ) ) {
            $wp_query->set_404();
            status_header( 404 );
            return;
        }

        $this->renderer->render_sitemap( $url_list );
        exit;
    }

    
Home | Imprint | This part of the site doesn't use cookies.