ThemeShaper Forums » Thematic

[closed]

Fatal error: cannot redeclare- site is down, please help!

(2 posts)
  • Started 12 years ago by cookieandkate
  • Latest reply from cookieandkate
  • This topic is resolved
  1. Hello,

    I'm in a panic. I installed and activated the WP Related Posts plugin. The instructions say to add <?php wp_related_posts(); ?> to my template, so I was trying to figure out where to add it, and how.

    I found a post in the forums that explained how to add the code for a similar plugin to the functions.php file, so I tried to modify it for my plugin (I'm a beginner when it comes to code), and added the following code to my functions.php file:

    function wp_related_posts($postfooter) {
    if (is_single()) {
    $postfooter .= wp_related_posts(array('post'),FALSE);
    }
    return $postfooter;
    }
    add_filter('thematic_postfooter', 'wp_related_posts');

    I received the following error when I tried to save the page:
    Fatal error: Cannot redeclare wp_related_posts() (previously declared in /home/content/48/6128548/html/wp-content/plugins/wordpress-23-related-posts-plugin/wp_related_posts.php:133) in /home/content/48/6128548/html/wp-content/themes/cookiemonster/functions.php on line 32

    I'm freaking out because I removed the code from functions.php, but every time I try to save the page, it returns the same error message. I can't go to any other admin page, so I can't deactivate the plugin.

    Please, please help!

    Posted 12 years ago #
  2. Crisis averted. I logged into my FTP client and fixed the functions.php file from there. Whew.

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.