WordPress.org

Ready to get started?Download WordPress

Forums

Login Panel Fatal Error (2 posts)

  1. SexyDawnT
    Member
    Posted 2 years ago #

    When I try to log-in the admin panel for my website, I am getting this error:

    Fatal error: Cannot redeclare is_child_theme() (previously declared in /home/freenc5/public_html/taylorlife.com/wp-includes/theme.php:17) in /home/freenc5/public_html/taylorlife.com/wp-admin/includes/theme.php on line 18

    I am not sure what it means. This is the code from the portion of theme.php that is being referred to:

    <?php
    /**
     * Theme, template, and stylesheet functions.
     *
     * @package WordPress
     * @subpackage Template
     */
    
    /**
     * Whether a child theme is in use.
     *
     * @since 3.0.0
     *
     * @return bool true if a child theme is in use, false otherwise.
     **/
    function is_child_theme() {
    	return ( TEMPLATEPATH !== STYLESHEETPATH );
    }
    
    /**
     * Retrieve name of the current stylesheet.
     *
     * The theme name that the administrator has currently set the front end theme
     * as.
     *
     * For all extensive purposes, the template name and the stylesheet name are
     * going to be the same for most cases.
     *
     * @since 1.5.0
     * @uses apply_filters() Calls 'stylesheet' filter on stylesheet name.
     *
     * @return string Stylesheet name.
     */
    function get_stylesheet() {
    	return apply_filters('stylesheet', get_option('stylesheet'));
    }
    
    /**
     * Retrieve stylesheet directory path for current theme.
     *
     * @since 1.5.0
     * @uses apply_filters() Calls 'stylesheet_directory' filter on stylesheet directory and theme name.
     *
     * @return string Path to current theme directory.
     */
    function get_stylesheet_directory() {
    	$stylesheet = get_stylesheet();
    	$theme_root = get_theme_root( $stylesheet );
    	$stylesheet_dir = "$theme_root/$stylesheet";
    
    	return apply_filters( 'stylesheet_directory', $stylesheet_dir, $stylesheet, $theme_root );
    }
    
    /**
     * Retrieve stylesheet directory URI.
     *
     * @since 1.5.0
     *
     * @return string
     */
    function get_stylesheet_directory_uri() {
    	$stylesheet = get_stylesheet();
    	$theme_root_uri = get_theme_root_uri( $stylesheet );
    	$stylesheet_dir_uri = "$theme_root_uri/$stylesheet";
    
    	return apply_filters( 'stylesheet_directory_uri', $stylesheet_dir_uri, $stylesheet, $theme_root_uri );
    }

    This happened after I re-installed WordPress

  2. crtenbarge
    Member
    Posted 2 years ago #

    Usually that is a bad plugin or theme... but this error code refers to files in the core, so I would re-upload wordpress. Download it from the wordpress.org site, delete the wp-contents folder, and upload everything else, overwrite everything.

    The only two things should never overwrite the wp-config.php file and the wp-contents folder. Double check before you upload.

    If that doesn't work, start with plugins then themes... and many of us highly recommend sticking with free themes in the wp directory. Paid themes else where are fine, free themes elsewere are sketchy.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.