Code with "zero" comments

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #68645

    Let me explain better, in the wp-portfolio / comments.php line 26-> 35 file there is this code:

    <h2 class="comments-title">
      if (1 == get_comments_number()) {
        printf(__('One thought on &ldquo;%2$s&rdquo;', 'wp-portfolio') , number_format_i18n(get_comments_number()) , '<span>' . get_the_title() . '</span>');
      else {
        printf(__('%1$s thoughts on &ldquo;%2$s&rdquo;', 'wp-portfolio') , number_format_i18n(get_comments_number()) , '<span>' . get_the_title() . '</span>');

    But I don’t understand where is the code that puts on “0 comments” because I would like to modify the text.
    I put the code in another file (inc/structure/content-extentions.php) and you can see below the thumbnails of my site


    Hi ALberto,

    Where you are getting 0 comments into your site?
    WP core function get_comments_number() retrieves the amount of comments a post has, if there are no comments it return 0.
    You can see the function description here.

    Thank you!



    I made a small change to my code.


    Thats Great! If you have any problem do not hesitate to contact us.

    Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.