Title: comments off from page.php
Last modified: August 18, 2016

---

# comments off from page.php

 *  [ugua](https://wordpress.org/support/users/ugua/)
 * (@ugua)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/comments-off-from-pagephp/)
 * In my page.php I don’t want to display the comments form.
    How do I take it off
   please?
 * Thanks

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/comments-off-from-pagephp/#post-370207)
 * Open page.php
    There will be two elements you need to remove. One looks similar
   to this: ` <div class="feedback"> <?php wp_link_pages(); ?> <?php comments_popup_link(
   __('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?> </div>
 * The other is
    `<?php comments_template(); // Get wp-comments.php template ?>`
 * Removing them will do the trick.
    If you hit a problem, let us know what theme
   you have and we can get exact advice 🙂
 *  Thread Starter [ugua](https://wordpress.org/support/users/ugua/)
 * (@ugua)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/comments-off-from-pagephp/#post-370210)
 * Here is my template:
 * <?php
    get_header(); ?> <?php if (have_posts()) : while (have_posts()) : the_post();?
   >
 * <div class=”entry<?php if(is_home() && $post==$posts[0] ) echo ‘ firstpost’;?
   >”>
    <!–<h2 class=”entrydate”> <?php the_date() ?> </h2> –><h3 class=”entrytitle”
   id=”post-<?php the_ID(); ?>”> ” rel=”bookmark”> <?php the_title(); ?>  </h3> 
   <div class=”entrymeta”> <?php edit_post_link(__(‘**Edit**‘)); ?> </div>
 *  <div class=”entrybody”>
    <?php the_content(__(‘(Read the article)’)); ?> <p 
   class=”comments_link”> <?php $comments_img_link = ‘<img src=”‘ . get_stylesheet_directory_uri().‘/
   images/comments.gif” title=”comments” alt=”*” />’; comments_popup_link(‘ Comments(
   0)’, $comments_img_link . ‘ Comments(1)’, $comments_img_link . ‘ Comments(%)’);?
   >
 *  </div>
    <!– <?php trackback_rdf(); ?> –> </div> <?php comments_template(); //
   Get wp-comments.php template endwhile; else: ?>
 *  <?php _e(‘Sorry, no posts matched your criteria.’); ?>
 * <?php
    endif;
 *  ?>
 * </div>
    <?php get_sidebar(); ?> <!– The main column ends –> <?php get_footer();?
   >
 *  [ladydelaluna](https://wordpress.org/support/users/ladydelaluna/)
 * (@ladydelaluna)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/comments-off-from-pagephp/#post-370214)
 * `<p class="comments_link">
    <?php $comments_img_link = '<img src="' . get_stylesheet_directory_uri().'/
   images/comments.gif" title="comments" alt="*" />'; comments_popup_link(' Comments(
   0)', $comments_img_link . ' Comments(1)', $comments_img_link . ' Comments(%)');?
   >
 * and
 * `<?php comments_template(); // Get wp-comments.php template
    endwhile; else: ?
   >
 * remove those. 🙂
 *  Thread Starter [ugua](https://wordpress.org/support/users/ugua/)
 * (@ugua)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/comments-off-from-pagephp/#post-370220)
 * I deleted the second code u said and:
 * Parse error: parse error, unexpected T_ENDIF in /home/dfsfsdfsdf/public_html/
   wp2/wp-content/themes/ftiny/page.php on line 35
 *  [iand](https://wordpress.org/support/users/iand/)
 * (@iand)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/comments-off-from-pagephp/#post-370222)
 * Where you took out `<?php comments_template(); // Get wp-comments.php template
   
   endwhile; else: ?>
   , put back:
    <?php endwhile; else: ?> (I think).
 *  [ladydelaluna](https://wordpress.org/support/users/ladydelaluna/)
 * (@ladydelaluna)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/comments-off-from-pagephp/#post-370223)
 * sorry – i missed the last part…
 * i think it’s this:
 * `<?php comments_template(); // Get wp-comments.php template
    endwhile; else: ?
   >
 * <?php _e('Sorry, no posts matched your criteria.'); ?>
 * <?php
    endif;
 * ?>
 * that has to go.
 *  Thread Starter [ugua](https://wordpress.org/support/users/ugua/)
 * (@ugua)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/comments-off-from-pagephp/#post-370231)
 * thanks IanD it helped 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘comments off from page.php’ is closed to new replies.

## Tags

 * [page.php](https://wordpress.org/support/topic-tag/page-php/)

 * 7 replies
 * 4 participants
 * Last reply from: [ugua](https://wordpress.org/support/users/ugua/)
 * Last activity: [20 years, 1 month ago](https://wordpress.org/support/topic/comments-off-from-pagephp/#post-370231)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
