WordPress.org

Forums

Fatal Eror when changing a theme (3 posts)

  1. potemkin
    Member
    Posted 5 years ago #

    When I change my theme - or try to change rather to say - I get this message: Fatal error: Cannot redeclare __popular_posts() (previously declared in D:\xampp\htdocs\wordpress\wp-content\themes\Diadema\functions.php:545) in D:\xampp\htdocs\wordpress\wp-content\themes\Diadema\functions.php on line 786
    After that everything freaks out - I cann't continue working with WP at all. Even when I try to call wp-admin I get the same message.
    Please advice.

  2. Equal Web Creative
    Member
    Posted 5 years ago #

    Is the theme you are activating a child theme of the one that the site was already using?

  3. potemkin
    Member
    Posted 5 years ago #

    No, it is absolutly another theme - as far as I can say. The situation is so: I have dowloaded a couple of themes from different sources and extracted them to "Themes" folder. I see them all from Admin Panel. Then when I try to activate one of them then I run into this problem. Yesterday I have found out that by some reasons the code in the file "functions.php" is duplicated. I deleted a part of the code and then everything was fine - I could work with the themes. But next time with a new theme I got the same problem. I can of course delete a part of the code every time, but I just want to understand why is it happening.

Topic Closed

This topic has been closed to new replies.

About this Topic