The %
character is a special character in the gettext translation functions. To escape the %
character to use it in a string, change it to %%
.
If you weren’t using the __()
translation functions, then a single %
character would give you the number of comments. However, when you are using the translation functions, %
is a special character with special meaning. If you want to actually include a %
character in the string, you need to type it as %%
. The __()
function will send a single %
on to the comments_number
function, and you should get the number of comments in its place.
Your comments_number
function should be:
comments_number( __('There are no comments so far', 'hbthemes'), __('There is <strong>1 comment</strong> so far', 'hbthemes'), __('There are <strong>%% comments</strong> so far', 'hbthemes') );