round counts and one in views
-
hi! I have some problem. some of my posts has reached more that 1000 views,
but in the list of posts and in single post page there is just named “1 view”.
any try to change template in settings didn’t helped me – it didn’t even changed anything. so, i want to use rounded number of views, or maybe just full number of views.this is my code in single.php:
<?php echo get_plural_form( (int) the_views( false ), ‘просмотр’, ‘просмотра’, ‘просмотров’ ); ?>functions.php:
function get_plural_form( $number ) {
global $l10n;$strings = array_slice( func_get_args(), 1 );
$plural_form = $l10n[‘default’]->select_plural_form( $number );if ( $plural_form > 2 ) {
$plural_form = 0;
}return $number . ‘ ‘ . $strings[ $plural_form ];
}i used plural russian form – i think because of it it doesn’t works good…
- The topic ‘round counts and one in views’ is closed to new replies.