PHP code example of isaactopo / xmlsitemap

1. Go to this page and download the library: Download isaactopo/xmlsitemap library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

isaactopo / xmlsitemap example snippets


'isaactopo.xmlsitemap.ignore' => ['error', 'legal'],

'isaactopo.xmlsitemap.

'isaactopo.xmlsitemap.addCollection' => function () {
    $professionals = kirby()->users()->filterBy('publish', true);
    $profiles = [];
    foreach($professionals as $professional){
        $profiles[] = Page::factory([
            'slug' => 'team/'.$professional,
            'template' => 'profile',
            'content' => [
                'author' => $professional,
                ]
            ]);
        }
    return $profiles;
},