SimpleSEO doesn't descend into the subpages. It only looks at the top level. So, this mod is good for that, too.
The following mod drills into the subpages, and it is recursive. You can have as many levels of subpages as you need.
This is for the version 3.2.1 of simple-seo.php
Find the following comment and foreach:
Code: Select all
// CMS pages
foreach ($Wcms->get('config', 'menuItems') as $item) {
Code: Select all
foreach ($Wcms->get('config', 'menuItems') as $item) {
simpleSeoPage($item, $output, $BASE_URL);
}
Code: Select all
function simpleSeoPage($item, &$output, $BASE_URL) {
if ($item->visibility !== 'hide') {
$output[] = $BASE_URL . $item->slug;
}
foreach ($item->subpages as $subpage) {
simpleSeoPage($subpage, $output, $BASE_URL . $item->slug . '/');
}
}
Ideally, if someone would like to tackle it (I'm not interested), on the admin page there should be a checkbox for "Include subpages?"