• Hi All!

    I am using WP 1.5 beta and have added the ‘recent posts’ plugin from 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)
  • Deactivate plugin.
    Make a few posts.
    reactivate it ??

    Thread Starter mustardnut

    (@mustardnut)

    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

    (@macmanx)

    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 for spelling it all out.

    Hope that helps!

    Thread Starter mustardnut

    (@mustardnut)

    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!

    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….

    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 to help.

    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

    (@mustardnut)

    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…

    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.