The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
add custom number t...
 
Share:
Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpDiscuz community!

Merry Christmas and Happy Holidays! 🎄

[Solved] add custom number type to replace english number

3 Posts
2 Users
1 Reactions
5,098 Views
Posts: 2
Topic starter
(@janakkafle)
New Member
Joined: 4 years ago

i want to replace English number with Devanagari number and add some code in function.php of theme and it works on theme but doesn't work on plugin can you please guide me how can i replace English number . 

the code i have use

function make_nep_number( $str ) {
$engNumber = array(1,2,3,4,5,6,7,8,9,0);
$nepNumber = array("१","२","३","४","५","६","७","८","९","०");
$converted = str_replace($engNumber, $nepNumber, $str);

return $converted;
}

add_filter( 'comments_number', 'make_nep_number' );


2 Replies
Asti
Posts: 8205
 Asti
Support
(@asti)
Illustrious Member
Joined: 8 years ago

@janakkafle,

You should use the get_comments_number hook instead of the comments_number one. 


Reply
Posts: 2
Topic starter
(@janakkafle)
New Member
Joined: 4 years ago

Thanks It works . 


Reply
Share: