admin管理员组文章数量:1424540
if(is_tax())
{
$currentTermType = get_query_var( 'taxonomy' );
$cat_icon = get_field('logo', $queried_object);
$termId= get_queried_object()->term_id;
if(is_tax($currentTermType) && $termId==$term->term_id)
$carrentActiveClass='class="active-cat"';
$i=0;
}
$icon = get_field('logo', $term->taxonomy . '_' . $term->term_id);
$va_category_HTML .= '<li class="logolar" '.$carrentActiveClass.'>' .'<a class="rownum">' .$i++. '</a>'. '</a>';
$va_category_HTML .= sprintf('<img src="%s" />', $icon) . '</a>';
$va_category_HTML .='<a href="' . esc_url( $term_link ) . '">' . $term->name . '</a>';
if (empty( $instance['wcw_hide_count'] )) {
$va_category_HTML .='<span class="post-count">'.$term->count.'</span>';
}
$va_category_HTML .='</li>';
}
this is my code
if(is_tax())
{
$currentTermType = get_query_var( 'taxonomy' );
$cat_icon = get_field('logo', $queried_object);
$termId= get_queried_object()->term_id;
if(is_tax($currentTermType) && $termId==$term->term_id)
$carrentActiveClass='class="active-cat"';
$i=0;
}
$icon = get_field('logo', $term->taxonomy . '_' . $term->term_id);
$va_category_HTML .= '<li class="logolar" '.$carrentActiveClass.'>' .'<a class="rownum">' .$i++. '</a>'. '</a>';
$va_category_HTML .= sprintf('<img src="%s" />', $icon) . '</a>';
$va_category_HTML .='<a href="' . esc_url( $term_link ) . '">' . $term->name . '</a>';
if (empty( $instance['wcw_hide_count'] )) {
$va_category_HTML .='<span class="post-count">'.$term->count.'</span>';
}
$va_category_HTML .='</li>';
}
this is my code
Share Improve this question edited Jun 7, 2019 at 6:37 Ramin Mahmudov asked Jun 6, 2019 at 11:18 Ramin MahmudovRamin Mahmudov 511 silver badge12 bronze badges 2- And what is your question? – kero Commented Jun 6, 2019 at 12:02
- i want numbering start from first line.. – Ramin Mahmudov Commented Jun 6, 2019 at 12:09
1 Answer
Reset to default 1What if you started your index at 1, instead of 0?
Change: $i=0;
To: $i=1;
You might have checked, but you aren't having an CSS / layout issues, are you?
本文标签: taxonomyline order number start numbering from second line (SOLVED)
版权声明:本文标题:taxonomy - line order number start numbering from second line (SOLVED) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745429140a2658251.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论