Title: Recent Posts Error
Last modified: August 18, 2016

---

# Recent Posts Error

 *  [mustardnut](https://wordpress.org/support/users/mustardnut/)
 * (@mustardnut)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/recent-posts-error/)
 * Hi All!
 * I am using WP 1.5 beta and have added the ‘recent posts’ plugin from [MtDewVirus](http://dev.wp-plugins.org/wiki/MtDewVirus).
   I have uploaded the recentposts.php file as instructed. When I insert <?php get_recent_posts();?
   > as instructed into my sidebar where I want it to show up, I get the following
   error “Fatal error: Call to undefined function: get_recent_posts() in /home/timandto/
   public_html/mustardnut/wp-content/themes/default/index.php on line 289”
 * I am fairly new to php and could use some help if anyone has a moment or two.
 * Thanks!

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

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/recent-posts-error/#post-135516)
 * Deactivate plugin.
    Make a few posts. reactivate it 🙂
 *  Thread Starter [mustardnut](https://wordpress.org/support/users/mustardnut/)
 * (@mustardnut)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/recent-posts-error/#post-135644)
 * Thanks podz, you are always quick to respond!
 * I deactivated the plugin, when I reactivated it I got the following errors at
   the top of the admin panel:
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/timandto/public_html/mustardnut/wp-content/plugins/recent-posts.php:
   2) in /home/timandto/public_html/mustardnut/wp-admin/admin.php on line 7
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/timandto/public_html/mustardnut/wp-content/plugins/recent-posts.php:
   2) in /home/timandto/public_html/mustardnut/wp-admin/admin.php on line 8
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/timandto/public_html/mustardnut/wp-content/plugins/recent-posts.php:
   2) in /home/timandto/public_html/mustardnut/wp-admin/admin.php on line 9
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/timandto/public_html/mustardnut/wp-content/plugins/recent-posts.php:
   2) in /home/timandto/public_html/mustardnut/wp-admin/admin.php on line 10
 * Any ideas? I deleted and copied a fresh copy of recentposts.php and still get
   the same error…
 * Thanks again!
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/recent-posts-error/#post-135647)
 * [http://codex.wordpress.org/Answers-Trouble_Shooting#Headers_already_sent](http://codex.wordpress.org/Answers-Trouble_Shooting#Headers_already_sent)
 *  [ejm](https://wordpress.org/support/users/llizard/)
 * (@llizard)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/recent-posts-error/#post-135654)
 * I don’t know if this will help. However, I had some difficulty initially with
   getting the ‘recent posts’ and ‘recent comments’ plugins from MtDewVirus to work
   as well. There is one small but important thing missing from the instructions.(
   It’s probably so basic that they didn’t think it was necessary to mention but
   for those of us brand new to php world, nothing is basic….)
 * The recent-posts.php has to be uploaded to wordpress/wp-content/plugins Then,
   the plugin has to be activated by going to WordPress Plugin Management.
 * It was after doing that that suddenly the errors I was generating stopped and
   the hack worked perfectly. Thanks to [Krischan Jodies’ recent comments plugin](http://blog.jodies.de/archiv/2004/11/13/recent-comments/)
   for spelling it all out.
 * Hope that helps!
 *  Thread Starter [mustardnut](https://wordpress.org/support/users/mustardnut/)
 * (@mustardnut)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/recent-posts-error/#post-135680)
 * macmanux – thanks for the link! I checked my admin.php file (which is where the
   errors says that the problem is) and made sure that there were no spaces. I uploaded
   the version that I checked and still have the same problem.
 * It says there is a problem with lines 7,8,9, & 10. According to my admin.php 
   file, that is this bit of code:
 * `header('Expires: Mon, 11 Jan 1984 05:00:00 GMT');
    header('Last-Modified: ' .
   gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: no-cache, must-revalidate,
   max-age=0'); header('Pragma: no-cache');
 * Any ideas?
 * llizard – thanks to you as well. It took me a couple of days after first installing
   the plugin to realize that I needed to enable it! I checked on Krischan Jodies’
   page and found good info on ‘recent comments.php’ but nothing on ‘recentposts.
   php.’ Does the preceding info bring anything to mind for you either?
 * Thanka again for all the help guys. My favorite part of WordPress has been how
   spectacular the support forums are. Keep it up!
 *  [ejm](https://wordpress.org/support/users/llizard/)
 * (@llizard)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/recent-posts-error/#post-135699)
 * Sorry, I’m afraid I know next to nothing about this mustardnuts; I’m a rank beginner
   myself. Mtdewvirus’ recent posts plugin IS working for me. I have no idea why
   it is and yours isn’t. The only thing I can think of is to delete the file from
   your server, upload the file again and make sure it is being uploaded in ASCII.
   Enable it again. It might not work but it’s worth a try….
 *  [r_lph50](https://wordpress.org/support/users/r_lph50/)
 * (@r_lph50)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-error/#post-135713)
 * mustardnut, it’s probably whitspace in the plugin that is causing the problems
   not the `admin.php` file. Check the `recent-posts.php` file from MtDewVirus using
   [this guide](http://codex.wordpress.org/Answers-Trouble_Shooting#Headers_already_sent)
   to help.
 *  [maestro42](https://wordpress.org/support/users/maestro42/)
 * (@maestro42)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-error/#post-135714)
 * i got that error recently and what i have found to work is to do the following:
 * 1) deactivate the plugin
    2) remove the actual file from your wp-content/plugins
   folder on your server…
 * that should fix problem
    login and check the plugins page
 * then
 * 3) re-upload the original plugin
 * should work – then you can keep going as planned
 *  Thread Starter [mustardnut](https://wordpress.org/support/users/mustardnut/)
 * (@mustardnut)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/recent-posts-error/#post-135729)
 * Spectacular! This finally did the trick.
 * Thanks again to everyone in this great support forum! Your hard work is immensly
   appreciated…
 * Now if I can just figure out how to make ‘pages’ work…
 *  [kapilmohan](https://wordpress.org/support/users/kapilmohan/)
 * (@kapilmohan)
 * [21 years ago](https://wordpress.org/support/topic/recent-posts-error/#post-135799)
 * Guys, to resolve the output already started error, just make sure that recent-
   posts.php file has absolutely nothing (not even blank line) before its <?php 
   tag… ‘<‘ should be the first character of the plugin file.

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

The topic ‘Recent Posts Error’ is closed to new replies.

 * 10 replies
 * 7 participants
 * Last reply from: [kapilmohan](https://wordpress.org/support/users/kapilmohan/)
 * Last activity: [21 years ago](https://wordpress.org/support/topic/recent-posts-error/#post-135799)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
