Title: Replace theme-option.php
Last modified: August 31, 2016

---

# Replace theme-option.php

 *  [vrrebels](https://wordpress.org/support/users/vrrebels/)
 * (@vrrebels)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/replace-theme-optionphp/)
 * Hello,
 * I want that my child theme replace the file /functions/theme-option.php with 
   my theme-option.php
 * so in my child-theme folder I created a directory /functions/theme-option.php
   and then I edited the functions.php in this way :
 *     ```
       <?php
       /************** Child Script *********/
   
       add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
       function theme_enqueue_styles() {
           wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
       }
   
       /********** Includes **********/
       require_once( get_stylesheet_directory() . '/functions/theme-options.php' );
       ?>
       ```
   
 * But unfortunally this give my a cannot_redeclare error.
 * Can you please help ?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [10 years, 3 months ago](https://wordpress.org/support/topic/replace-theme-optionphp/#post-6927834)
 * What is the full error? Cannot redefine ‘theme_enqueue_styles’ function?
    Rename
   the function if so.
 *  Thread Starter [vrrebels](https://wordpress.org/support/users/vrrebels/)
 * (@vrrebels)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/replace-theme-optionphp/#post-6927894)
 * No the error is cannot redeclare “path to parent” theme-option.php to “path to
   children” theme-option.php

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Replace theme-option.php’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/hueman/3.7.27/screenshot.png)
 * Hueman
 * [Support Threads](https://wordpress.org/support/theme/hueman/)
 * [Active Topics](https://wordpress.org/support/theme/hueman/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/hueman/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/hueman/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [vrrebels](https://wordpress.org/support/users/vrrebels/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/replace-theme-optionphp/#post-6927894)
 * Status: not resolved