Title: single.php
Last modified: August 22, 2016

---

# single.php

 *  Resolved [samijalal](https://wordpress.org/support/users/samijalal/)
 * (@samijalal)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/singlephp-12/)
 * i made something in this code
 *     ```
       <?php
       					// If comments are open or we have at least one comment, load up the comment template
       					if ( comments_open() || '0' != get_comments_number() )
       				?>
   
                                               comments_template( '', true );	
   
       <?php get_sidebar('sidebar-1'); ?>
       <?php get_footer(); ?>
       ```
   
 * and a problem happened in the main page of my website
 * [http://salfit.info](http://salfit.info)
 * the code
    comments_template( ”, true );
 * appeared in the main page
 * sorry but i dont know about codes 🙂

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

 *  Thread Starter [samijalal](https://wordpress.org/support/users/samijalal/)
 * (@samijalal)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/singlephp-12/#post-5174867)
 * sorry not in the main page
 * it appears when i enter a post
 * [http://salfit.info/2014/08/%D8%A7%D9%84%D8%A8%D9%84%D8%AF%D8%A9-%D8%A7%D9%84%D9%82%D8%AF%D9%8A%D9%85%D8%A9/](http://salfit.info/2014/08/%D8%A7%D9%84%D8%A8%D9%84%D8%AF%D8%A9-%D8%A7%D9%84%D9%82%D8%AF%D9%8A%D9%85%D8%A9/)
 * and also (leave a reply) was disappeared…!
 *  [Waqas](https://wordpress.org/support/users/speedito/)
 * (@speedito)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/singlephp-12/#post-5174874)
 * Your code should be like this:
 *     ```
       <?php
       					// If comments are open or we have at least one comment, load up the comment template
       					if ( comments_open() || '0' != get_comments_number() )
   
                                               comments_template( '', true );	?>
   
       <?php get_sidebar('sidebar-1'); ?>
       <?php get_footer(); ?>
       ```
   
 *  Thread Starter [samijalal](https://wordpress.org/support/users/samijalal/)
 * (@samijalal)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/singlephp-12/#post-5174876)
 * i did but another problem happened..
 * All the widgets go down
 * [http://salfit.info/2014/08/%D8%A7%D9%84%D8%A8%D9%84%D8%AF%D8%A9-%D8%A7%D9%84%D9%82%D8%AF%D9%8A%D9%85%D8%A9/](http://salfit.info/2014/08/%D8%A7%D9%84%D8%A8%D9%84%D8%AF%D8%A9-%D8%A7%D9%84%D9%82%D8%AF%D9%8A%D9%85%D8%A9/)
 *  Thread Starter [samijalal](https://wordpress.org/support/users/samijalal/)
 * (@samijalal)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/singlephp-12/#post-5174890)
 * okay i solved it
 * this is the right code
 *     ```
       <?php
       					// If comments are open or we have at least one comment, load up the comment template
       					if ( comments_open() || '0' != get_comments_number() )
       				        comments_template( '', true ); ?>
   
                               <?php endwhile; // end of the loop. ?>
   
       			</div><!-- #content .site-content -->
       		        </div><!-- #primary .content-area -->
   
       <?php get_sidebar('sidebar-1'); ?>
       <?php get_footer(); ?>
       ```
   

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

The topic ‘single.php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [samijalal](https://wordpress.org/support/users/samijalal/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/singlephp-12/#post-5174890)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
