Title: Error with Child Theme
Last modified: August 30, 2016

---

# Error with Child Theme

 *  Resolved [WebsitesPro](https://wordpress.org/support/users/websitespro/)
 * (@websitespro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/)
 * Hi, i created today a child theme, and at the beginnig all was good but then 
   i was editing functions.php and the page fall, this is the link [http://nuevo.luissomaza.com/](http://nuevo.luissomaza.com/),
   the template i use is Syndey from Athemes.
    This is the error `Fatal error: Cannot
   redeclare class Sydney_Latest_News in /home/luissoma/public_html/nuevo/wp-content/
   themes/sydney/widgets/fp-latest-news.php on line 131`
 * I created the child theme because i needed to add more entries at the section
   latest news, i follow the insturctions for the support of the page, but then 
   happen the error, and i have wait all the day for an anwser but they are not 
   responding now.
 * The error has change a few times because i tried to fix it uploading the original
   archives again, but the only thing that change is the error and the line that
   says or the directory.
 * What can i do??
 * Please i really need help, my boss is gonna kill me if he see the page is dawn.

Viewing 15 replies - 1 through 15 (of 29 total)

1 [2](https://wordpress.org/support/topic/error-with-child-theme/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/error-with-child-theme/page/2/?output_format=md)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659079)
 * How did you create a Child Theme? What files were involved?
 *  Thread Starter [WebsitesPro](https://wordpress.org/support/users/websitespro/)
 * (@websitespro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659082)
 * I follow this instructions than the other support sends me, i did it all but 
   when i was in the fifth step all fall.
 * Here is the steps:
    1. create a child theme 2. duplicate widgets/fp-latest-news.
   php from your parent theme to your child theme 3. open and edit fp-latest-news.
   php within your child theme change this line 'posts_per_page' => 3, to 'posts_per_page'
   => 6, 4. open and edit functions.php within your child theme then add this line:
   if ( function_exists('siteorigin_panels_activate') ) { require_once get_template_directory()."-
   child/widgets/fp-latest-news.php"; }
 * 5. open and edit fp-latest-news.php within your parent theme then change this
   line: require_once get_template_directory() . "/widgets/fp-latest-news.php";
   
   to // require_once get_template_directory() . "/widgets/fp-latest-news.php";
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659083)
 * > 2. duplicate widgets/fp-latest-news.php from your parent theme to your child
   > theme
 * Whoa that’s probably the thing that has broken your website. Can you remove this
   file (from your child theme)?
 *  Thread Starter [WebsitesPro](https://wordpress.org/support/users/websitespro/)
 * (@websitespro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659084)
 * For the child theme i created a folder named sydney-child, i created a style.
   css in here that redirect from the sydney style.css, and then i choosed the child
   theme in the wordpress, till then all was fine
 *  Thread Starter [WebsitesPro](https://wordpress.org/support/users/websitespro/)
 * (@websitespro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659085)
 * i removed but now says this:
 * Warning: require_once(/home/luissoma/public_html/nuevo/wp-content/themes/sydney-
   child/widgets/fp-latest-news.php): failed to open stream: No such file or directory
   in /home/luissoma/public_html/nuevo/wp-content/themes/sydney-child/functions.
   php on line 9
 * Fatal error: require_once(): Failed opening required ‘/home/luissoma/public_html/
   nuevo/wp-content/themes/sydney-child/widgets/fp-latest-news.php’ (include_path
   =’.:/usr/lib/php:/usr/local/lib/php’) in /home/luissoma/public_html/nuevo/wp-
   content/themes/sydney-child/functions.php on line 9
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659086)
 * Okay and in your Child Theme functions.php file remove these lines:
 *     ```
       if ( function_exists('siteorigin_panels_activate') ) {
       require_once get_template_directory() . "-child/widgets/fp-latest-news.php";
       }
       ```
   
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659087)
 * Can I ask, where did you find these instructions?
 *  Thread Starter [WebsitesPro](https://wordpress.org/support/users/websitespro/)
 * (@websitespro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659088)
 * if i remove all the child theme the wordpress it will fixed?
 *  Thread Starter [WebsitesPro](https://wordpress.org/support/users/websitespro/)
 * (@websitespro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659089)
 * the support send me that when i asked how to add more entries
    [http://athemes.com/forums/forum/sydney/](http://athemes.com/forums/forum/sydney/)
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659090)
 * You can just remove those 3 lines and your site will be fixed.
 *  Thread Starter [WebsitesPro](https://wordpress.org/support/users/websitespro/)
 * (@websitespro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659091)
 * Right, i remove that lines
 * Now the error is
 * `Parse error: syntax error, unexpected '}' in /home/luissoma/public_html/nuevo/
   wp-content/themes/sydney-child/functions.php on line 9`
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659092)
 * At least your site will be back online for the theme authors to reply
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659093)
 * Copy all of the code of your functions.php file (child theme) here please
 *  Thread Starter [WebsitesPro](https://wordpress.org/support/users/websitespro/)
 * (@websitespro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659094)
 * this is the line 9
 * > }
   > if ( ! function_exists( ‘sydney_setup’ ) ) :
   >  /** * Sets up theme defaults 
   > and registers support for various WordPress features. * * Note that this function
   > is hooked into the after_setup_theme hook, which * runs before the init hook.
   > The init hook is too late for some features, such * as indicating support for
   > post thumbnails.
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/#post-6659095)
 * Sorry it’s best if we see all of the code in context. As long as it’s not like
   a thousand lines

Viewing 15 replies - 1 through 15 (of 29 total)

1 [2](https://wordpress.org/support/topic/error-with-child-theme/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/error-with-child-theme/page/2/?output_format=md)

The topic ‘Error with Child Theme’ is closed to new replies.

## Tags

 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)

 * 29 replies
 * 3 participants
 * Last reply from: [WebsitesPro](https://wordpress.org/support/users/websitespro/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/error-with-child-theme/page/2/#post-6659127)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
