M
M
malayamarisha2020-06-30 12:13:14
WordPress
malayamarisha, 2020-06-30 12:13:14

How is it possible to change the display style of the number of records in the widget?

Good day!
A widget with the "Show number of records" setting has been added to the page.
I would like to modify this number, add styles.
At the moment, the number of entries is displayed like this (2):

<ul>
<li class="cat-item cat-item-6"><a href="#">Рубрика 1</a> (2)
<ul class="children">
  <li class="cat-item cat-item-7"><a href="№">Подрубрика рубрики 1</a> (1)
</li>
</ul>
</li>
</ul>

Can you please tell me where it is possible to add styles for the number of headings?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
malayamarisha, 2020-06-30
@malayamarisha

Suddenly someone needs:
wp-includes/class-walker-category.php (186)

if ( ! empty( $args['show_count'] ) ) {
      //$link .= ' (' . number_format_i18n( $category->count ) . ')';//начальное оформление
      $link .= '<span class="cat-count">'." ". $category->count.'</span>';

    }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question