Движок wp 2.6.5
В пхп новичек, но нашел в файле category-template.php нужную функцию get_the_category_list.
Подправил код, смотрю по сервису пр-су, а рубрики закрыты тегами nofollow и noindex как угодно: с пропусками, т.е. закрыто, закрыто, а далее 10 рубрик не закрыто, потом обратно закрыто.
Уважаемые модератор и пхп программисты, подскажите, что я не так сделал? привожу код изменений этой функции:
if ( ” == $separator ) {
$thelist .= ‘<ul class="post-categories">’;
foreach ( $categories as $category ) {
$thelist .= "\n\t<li>";
switch ( strtolower($parents) ) {
case ‘multiple’:
if ($category->parent)
$thelist .= get_category_parents($category->parent, TRUE);
$thelist .= ‘<noindex><a href="’ . get_category_link($category->term_id) . ‘" title="’ . sprintf(__("View all posts in %s"), $category->name) . ‘" ‘ . $rel . ‘rel="nofollow">’ . $category->name.'</a></noindex></li>’;
break;
case ‘single’:
$thelist .= ‘<noindex><a href="’ . get_category_link($category->term_id) . ‘" title="’ . sprintf(__("View all posts in %s"), $category->name) . ‘" ‘ . $rel . ‘rel="nofollow">’;
if ($category->parent)
$thelist .= get_category_parents($category->parent, FALSE);
$thelist .= $category->name.'</a></noindex></li>’;
break;
case ”:
default:
$thelist .= ‘<noindex><a href="’ . get_category_link($category->term_id) . ‘" title="’ . sprintf(__("View all posts in %s"), $category->name) . ‘" ‘ . $rel . ‘rel="nofollow">’ . $category->cat_name.'</a></noindex></li>’;
}
}
$thelist .= ‘</ul>’;
} else {
$i = 0;
foreach ( $categories as $category ) {
if ( 0 < $i )
$thelist .= $separator . ‘ ‘;
switch ( strtolower($parents) ) {
case ‘multiple’:
if ( $category->parent )
$thelist .= get_category_parents($category->parent, TRUE);
$thelist .= ‘<noindex><a href="’ . get_category_link($category->term_id) . ‘" title="’ . sprintf(__("View all posts in %s"), $category->name) . ‘" ‘ . $rel . ‘rel="nofollow">’ . $category->cat_name.'</a></noindex>’;
break;
case ‘single’:
$thelist .= ‘<noindex><a href="’ . get_category_link($category->term_id) . ‘" title="’ . sprintf(__("View all posts in %s"), $category->name) . ‘" ‘ . $rel . ‘rel="nofollow">’;
if ( $category->parent )
$thelist .= get_category_parents($category->parent, FALSE);
$thelist .= "$category->cat_name</a></noindex>";
break;
case ”:
default:
$thelist .= ‘<noindex><a href="’ . get_category_link($category->term_id) . ‘" title="’ . sprintf(__("View all posts in %s"), $category->name) . ‘" ‘ . $rel . ‘rel="nofollow">’ . $category->name.'</a></noindex>’;
}
++$i;
}
