WordPress.org

Ready to get started?Download WordPress

Forums

Code to only show on pages with Comments On (1 post)

  1. Jon W
    Member
    Posted 2 years ago #

    Hi

    I have added

    <p>
    <a href="#comment"><b>Questions and Comments</b></a> (<?php comments_number( 'Ask a question', 'one response', '% responses' ); ?>).
    </p>

    to my pages under the titles to encourage people to comment. But on some pages I have comments switched off. Is there is simple code that I can wrap around that so it is only shown when comments are on?

Topic Closed

This topic has been closed to new replies.

About this Topic