I am working at a WordPress setup on my local computer using AMPPS as my localhost. Using the Delta Theme I created a Child Theme (delta2-child). The initial setup works great. However, I need to change a file in the includes folder called home-slider.php.

location of original file:

c:\Program Files (x86)\Ampps\www\armstrong\wp-content\themes\delta\includes\home-slider.php

Location of Child Theme files:

c:\Program Files (x86)\Ampps\www\armstrong\wp-content\themes\delta2-child\includes\home-slider.php

If I move the home-slider file to the Child Theme folder[ delta2-child\includes\home-slider.php ], the theme still uses the Parent Themes home-slider file.

If I add the following to the CT’s functions.php file:

require_once( get_stylesheet_directory_uri() . "/includes/home-slider.php" ); */

I get the following error:

Warning: require_once(C:\Program Files (x86)\Ampps\www\armstrong/wp-content/themes/delta/includes/home-slider.php) [function.require-once]: failed to open stream: No such file or directory in C:\Program Files (x86)\Ampps\www\armstrong\wp-content\themes\delta2-child\header.php on line 87

Fatal error: require_once() [function.require]: Failed opening required 'C:\Program Files (x86)\Ampps\www\armstrong/wp-content/themes/delta/includes/home-slider.php' (include_path='.;C:\php\pear') in C:\Program Files (x86)\Ampps\www\armstrong\wp-content\themes\delta2-child\header.php on line 87

Can any knowledgeable soul tell me how to refer to the home-slider file without gernerating the error above.

Leave a Reply

Your email address will not be published.