Show all categories pages in WordPress sitemap?
-
Good day, dear specialists. There is such a code
$categoriesForSitemap = get_categories(array( 'hide_empty' => 1, 'depth' => 0, 'hierarchical' => false )); foreach($categoriesForSitemap as $category) { $category_link = get_category_link($cat->cat_ID); $sitemap .= '<url>' . '<loc>' . get_category_link($category->term_id) . '</loc>' . '<priority>1</priority>' . '<lastmod></lastmod>' . '<changefreq>daily</changefreq>' . '</url>'; }
How can I enable adding all category pages in it? Those.
category-name/page/2/ category-name/page/3/ .....
and so on.
Plase help me. Sorry for my English.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.