• Resolved virtualerik

    (@virtualerik)


    Hello,
    I have searched for answers to this question, but couldn’t find any. I apologize if this has been answered before, but I really did try to find it.

    I cannot get the “Comments Off” text to display in my index. This has been the case for a few versions for me now, and I am thinking my theme may be the problem.

    This is the function call in my theme file, looks correct:
    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>

    And this is the function signature:
    function comments_popup_link( $zero = 'No Comments', $one = '1 Comment', $more = '% Comments', $css_class = '', $none = 'Comments Off' )

    I cannot see any errors personally.

    When my comments are turned off, it shows “No Comments”.

    Thanks in advance,
    Erik

Viewing 1 replies (of 1 total)
  • Thread Starter virtualerik

    (@virtualerik)

    Well, I still didn’t find the error, but I assume it may have to do with some function overriding another function etc.

    I solved it with an if-statement. Not the best solution, but it does the job. Looks like this now:

    <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> |
    				<?php edit_post_link('Edit', '', ' | ');
    					if ('open' == $post->comment_status) :
    						comments_popup_link('No Comments »', '1 Comment »', '% Comments »');
    					else : // comments are closed
    					// If comments are closed
    					?>
    						Comments are closed
    					<?php endif; ?>
                    </p>

    It’s pretty ugly from a programming point of view, but it works, and so I will leave it until I come up with something better.

Viewing 1 replies (of 1 total)
  • The topic ‘“Comment Off” isn’t showing’ is closed to new replies.