Публикации
< ?php
// Add categories seprated with comma (,) you'd like to hide to display on sitemap
$cats = get_categories('exclude=');
foreach ($cats as $cat) {
echo "
-
„.$cat->cat_name.“
„;
echo „
„;
query_posts(‘posts_per_page=-1&cat=’.$cat->cat_ID);
while(have_posts()) {
the_post();
$category = get_the_category();
// Only display a post link once, even if it’s in multiple categories
if ($category[0]->cat_ID == $cat->cat_ID) {
echo ‘
- ‘.get_the_title().’
‘;
}
}
echo „
„;
echo „“;
}
?>
Категории
< ?php wp_list_cats("sort_column=name&feed_image=/wp-content/themes/Horcrux/images/rss-small.png&optioncount=1&hierarchical=0"); ?>
Страници
< ?php
// Add pages seprated with comma[,] that you'd like to hide to display on sitemap
wp_list_pages(
array(
'exclude' => “,
‘title_li’ => “,
)
);
?>
„.$cat->cat_name.“
„;
echo „
query_posts(‘posts_per_page=-1&cat=’.$cat->cat_ID);
while(have_posts()) {
the_post();
$category = get_the_category();
// Only display a post link once, even if it’s in multiple categories
if ($category[0]->cat_ID == $cat->cat_ID) {
echo ‘
‘;
}
}
echo „
echo „“;
}
?>
‘title_li’ => “,
)
);
?>

