Title: Comments Below Post Excerpt Issue
Last modified: August 31, 2016

---

# Comments Below Post Excerpt Issue

 *  Resolved [philiplp](https://wordpress.org/support/users/philiplp/)
 * (@philiplp)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/comments-below-post-excerpt-issue/)
 * Hello,
 * I can’t seem to get rid of comments below the post excerpt.
    Removing the lines
   regarding comments from the following file gives me the error:
 * > Parse error: syntax error, unexpected end of file in /home/content/p3pnexwpnas07_data01/
   > 33/2800233/html/wp-content/themes/alison-child/content-ecp.php on line 30
 *     ```
       <?php
       	global $enhanced_category;
       	// if not previously set up, then let setup_ec_data get the current query term/category
       	if (empty($categoryId)) {
       		$categoryId = null;
       	}
   
       	// get enhanced category post and set it up as global current post
       	$enhanced_category->setup_ec_data($categoryId);
       ?>
   
       <!-- enchanced category page (ECP) content -->
   
       <?php
       // try to load specialized template if exists. Prioritize specialized ECP template part.
       if ( !locate_template( array('content-ecp.php', 'content-page.php'), true, false ) ) {
       ?>
       	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
   
       		<div class="post-thumbnail">
       			<?php the_post_thumbnail(); ?>
       		</div>
   
       		<div class="entry-content">
       			<?php the_content(); ?>
       		</div><!-- .entry-content -->
   
       		<?php edit_post_link( __( 'Edit'), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
   
       	</article><!-- #post-## -->
       <?php
       }
           // If comments are open or we have at least one comment, load up the comment template
           if ( comments_open() || get_comments_number() ) :
               comments_template();
           endif;
       ?>
       ```
   
 * I’ve also tried the following as per your suggestion in another thread, but I
   just get a blank page in return:
 *     ```
       <?php
       	global $enhanced_category;
       	// if not previously set up, then let setup_ec_data get the current query term/category
       	if (empty($categoryId)) {
       		$categoryId = null;
       	}
   
       	// get enhanced category post and set it up as global current post
       	$enhanced_category->setup_ec_data($categoryId);
       ?>
   
       <!-- enchanced category page (ECP) content -->
   
       <?php
       // try to load specialized template if exists. Prioritize specialized ECP template part.
       if ( !locate_template( array('content-ecp.php', 'content-page.php'), true, false ) ) {
       ?>
       	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
   
       		<div class="post-thumbnail">
       			<?php the_post_thumbnail(); ?>
       		</div>
   
       		<div class="entry-content">
       			<?php the_content(); ?>
       		</div><!-- .entry-content -->
   
       		<?php edit_post_link( __( 'Edit'), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
   
       	</article><!-- #post-## -->
       <?php
       }
       ```
   
 * Help would be greatly appreciated, as we have a big press launch soon. Thanks!
 * [https://wordpress.org/plugins/enhanced-category-pages/](https://wordpress.org/plugins/enhanced-category-pages/)

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

 *  Thread Starter [philiplp](https://wordpress.org/support/users/philiplp/)
 * (@philiplp)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/comments-below-post-excerpt-issue/#post-7123880)
 * By the way, the website is [nowunknown.com](http://nowunknown.com) if you want
   to take a look at it.
 *  Plugin Contributor [danaila_iulian](https://wordpress.org/support/users/danaila_iulian/)
 * (@danaila_iulian)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/comments-below-post-excerpt-issue/#post-7124149)
 * Hi!
 * Sorry for the problem you have. The issue is because you did not remove the condition
   to look for a content-ecp.php file, while it already is in that file, basically
   trying to find itself.
 * The corect code to paste in content-ecp is:
 *     ```
       <?php
               global $enhanced_category;
               // if not previously set up, then let setup_ec_data get the current query term/category
               if (empty($categoryId)) {
                       $categoryId = null;
               }
   
               // get enhanced category post and set it up as global current post
               $enhanced_category->setup_ec_data($categoryId);
       ?>
   
       <!-- enchanced category page (ECP) content -->
   
               <article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
   
                       <div class="post-thumbnail">
                               <?php the_post_thumbnail(); ?>
                       </div>
   
                       <div class="entry-content">
                               <?php the_content(); ?>
                       </div><!-- .entry-content -->
   
                       <?php edit_post_link( __( 'Edit'), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
   
               </article><!-- #post-## -->
       ```
   
 * We will update the Installation stepts to make that clearer.
 * Thank you!

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

The topic ‘Comments Below Post Excerpt Issue’ is closed to new replies.

 * ![](https://ps.w.org/enhanced-category-pages/assets/icon-256x256.png?rev=1101510)
 * [Enhanced Category Pages](https://wordpress.org/plugins/enhanced-category-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enhanced-category-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enhanced-category-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/enhanced-category-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enhanced-category-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enhanced-category-pages/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [danaila_iulian](https://wordpress.org/support/users/danaila_iulian/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/comments-below-post-excerpt-issue/#post-7124149)
 * Status: resolved