Top 10 - tptn_list_count filter examples
<?php
/**
* Remove brackets from the count.
*
* Add this code to your theme's functions.php file.
*
* @param $string $tptn_list_count Formatted list count
*/
function tptn_remove_brackets( $tptn_list_count ) {
$tptn_list_count = str_replace( array( '(', ')', ), '', $tptn_list_count );
return $tptn_list_count;
}
add_filter( 'tptn_list_count', 'tptn_remove_brackets' );
<?php
/**
* Display the formatted list count.
*
* Add this code to your theme's functions.php file.
*
* @param $string $tptn_list_count Formatted list count
*/
function tptn_display_formatted_count( $tptn_list_count, $sum_count, $result ) {
$tptn_list_count = get_tptn_post_count( $result->ID );
return $tptn_list_count;
}
add_filter( 'tptn_list_count', 'tptn_display_formatted_count', 10, 3 );