开发者

How to get rid of the "Leave a Comment" text in Wordpressa after deactivating "Allow comments"?

I deactivated "Allow commments in my page. But I still can see a "Leave a comment" link, how do I remove that text just for this contact page?

my template:

contact.php:

<?php
/开发者_开发知识库*
Template Name: Contact
*/

$body ="blog";
get_header();
?>
<div id="content">
 <div class="container">
  <div id="content-top">
   <div id="picture">
    <ul>
     <img src="<?php bloginfo('template_directory'); ?>/images/featured2.png"/>
    </ul>
   </div><!-- #slider -->
   <div id="tagline">
    <h2>Welcome to our BLOG!</h2>
    <p>以線上處理為原則,全省 或 全球 客戶接案客戶包括網頁設計公司需要代工亦可承接初期以我們可以製作的項目來經營以線上處理為原則</p>
    <a href="work.php">參觀我們的作品</a>
   </div>
  </div><!-- header-bottom -->
  <div id="content-bottom">
   <div id="blog-content">
    <?php get_template_part( 'loop', 'index' ); ?>
   </div>
  <?php get_sidebar(); ?>
  </div><!-- #mainbar -->
 </div><!-- .container -->
</div><!-- #main-content -->
</div><!-- #wrapper -->
<?php get_footer(); ?>


To remove the commenting section entirely, just edit the single.php in your theme folder and remove the following line of code:

<?php comments_template(); ?>

This is also good if you want to use another service for comments such as Disqus (which is a great tool). But, I think there is also a Wordpress plugin for Disqus should you choose that route later on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜