Title: Comments in php pages
Last modified: August 19, 2016

---

# Comments in php pages

 *  [moneyma](https://wordpress.org/support/users/moneyma/)
 * (@moneyma)
 * [17 years ago](https://wordpress.org/support/topic/comments-in-php-pages/)
 * Hi Guys,
 * I added a php file to blog which runs on wordpress 2.7, i want to use the wordpress
   commenting in my newly added php page. already i tried calling this function 
   <?php comments_template(); ?>, but it says undefined function. how do i add this
   commenting functionality of wordpress to my newly added php page.
 * note: my new php page and wordpress files are in different folder(same server).

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

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [17 years ago](https://wordpress.org/support/topic/comments-in-php-pages/#post-1108442)
 * Put this at the top any page you want to use wordpress functions on:
 * `<?php include 'path-to-wp-directory/wp-blog-header.php'; ?>`
 * … editing as necessary
 * oh and here ya go:
 * [http://www.google.com/#hl=en&q=use+wordpress+functions+outside+of+wordpress&aq=f&oq=&aqi=&fp=DLh7wmTRH1c](http://www.google.com/#hl=en&q=use+wordpress+functions+outside+of+wordpress&aq=f&oq=&aqi=&fp=DLh7wmTRH1c)
 *  Thread Starter [moneyma](https://wordpress.org/support/users/moneyma/)
 * (@moneyma)
 * [17 years ago](https://wordpress.org/support/topic/comments-in-php-pages/#post-1108449)
 * ok, if i add the below two lines in my new php file, it will work as the wordpress
   commenting system? or do i need to change any other things?
 * <?php include ‘path-to-wp-directory/wp-blog-header.php’; ?>
    <?php comments_template();?
   >
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [17 years ago](https://wordpress.org/support/topic/comments-in-php-pages/#post-1108450)
 * try it and see. wtf? if you paste that into a file, it wont work no. because 
   you are NOT following my instructions.
 *  Thread Starter [moneyma](https://wordpress.org/support/users/moneyma/)
 * (@moneyma)
 * [17 years ago](https://wordpress.org/support/topic/comments-in-php-pages/#post-1108451)
 * i am not good at php, thats why i asked… if you know please let me know

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

The topic ‘Comments in php pages’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [moneyma](https://wordpress.org/support/users/moneyma/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/comments-in-php-pages/#post-1108451)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
