14 posts
  • Has been part of the Envato Community for over 3 years
  • Has collected 10+ items on Envato Market
  • Located in Greece
haritos says

Hello!

I use the “Cherry – Responsive News and Magazine Theme” and I created a child theme and i want to edit the slider.php in the child theme. After editing the .php file in the child theme nothing happened. What i have to do to make changes in the php files in the child theme? Please answer!

624 posts Fuel Your Web
  • Elite Author: Sold more than $75,000 on Envato Market
  • Won a competition
  • Had an item featured on Envato Market
  • Has been part of the Envato Community for over 7 years
+5 more
Pirenko says

This might sound a bit dumb, but did you activate the child theme?

14 posts
  • Has been part of the Envato Community for over 3 years
  • Has collected 10+ items on Envato Market
  • Located in Greece
haritos says

This might sound a bit dumb, but did you activate the child theme?
None possible question or answer is dumb! Yes the child theme is already activated!

All i want to do is to edit some .php files! The path for the .php file i want to edit is :

/.../cherry/templates/slider.php (this is for the parent theme)
/.../e-win/templates/slider.php (this is for the child theme)

In the http://codex.wordpress.org/Child_Themes there is a paragraph named “Other Files” which there says:

In addition to style.css, functions.php, and to template files like index.php, and home.php, a child theme can use any type of file full-fledged themes use, as long as that file is properly linked. For example, a child theme can use icons and images that are linked from its stylesheet, JavaScript files linked from the top or bottom of pages, or extra PHP files called from its templates or from its functions.php file.

In other words if you have a file in your parent theme parent-theme-dir/includes/filename.php and this file is not included by any of your template files or functions.php file then you can not override this file by your child theme.

Do you have any idea what might be the problem?

3247 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says

is it a page template? if I recall child themes cant override page templates( its been a bit so I may be wrong )

14 posts
  • Has been part of the Envato Community for over 3 years
  • Has collected 10+ items on Envato Market
  • Located in Greece
haritos says

is it a page template? if I recall child themes cant override page templates( its been a bit so I may be wrong )

Sorry but i am a bit of new into this! What is a page template? I think it’s not a page template.. Here is a screenshot of where the “slider.php” (one of the files i want to edit) is: http://imgur.com/5xexMDs

280 posts
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
PrimaThemes says

We need to check how this theme developer call this template/slider.php in the parent theme.

If he use include(), require(), include_once(), or require_once() to call this template/slider.php, then it doesn’t support child theme 100%... (BAD)

But, if he use get_template_part() to call this template/slider.php, then it support child theme… (GOOD)

14 posts
  • Has been part of the Envato Community for over 3 years
  • Has collected 10+ items on Envato Market
  • Located in Greece
haritos says

We need to check how this theme developer call this template/slider.php in the parent theme.

If he use include(), require(), include_once(), or require_once() to call this template/slider.php, then it doesn’t support child theme 100%... (BAD)

But, if he use get_template_part() to call this template/slider.php, then it support child theme… (GOOD)
So how can i check this? Where do i have to look? Please help!!
280 posts
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
PrimaThemes says

So how can i check this? Where do i have to look? Please help!!

If you are familiar on working with php files, you can start searching the code like this on the parent theme files… Note: usually I use Notepad++ for my code editor to find a piece of code from a directory.

get_template_part( "templates/slider" );

If you can’t find this code on the theme, don’t waste your time, contact theme author and ask him to make the theme more child theme friendly…

14 posts
  • Has been part of the Envato Community for over 3 years
  • Has collected 10+ items on Envato Market
  • Located in Greece
haritos says


So how can i check this? Where do i have to look? Please help!!

If you are familiar on working with php files, you can start searching the code like this on the parent theme files… Note: usually I use Notepad++ for my code editor to find a piece of code from a directory.

get_template_part( "templates/slider" );
If you can’t find this code on the theme, don’t waste your time, contact theme author and ask him to make the theme more child theme friendly…

I use the Notepad++ too.. So i have to search the parent theme’s each file one by one?

556 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $1,000+ on Envato Market
  • Won a Most Wanted contest
  • Has been a beta tester for an Envato feature
+4 more
kriskorn says



So how can i check this? Where do i have to look? Please help!!

If you are familiar on working with php files, you can start searching the code like this on the parent theme files… Note: usually I use Notepad++ for my code editor to find a piece of code from a directory.

get_template_part( "templates/slider" );
If you can’t find this code on the theme, don’t waste your time, contact theme author and ask him to make the theme more child theme friendly…
I use the Notepad++ too.. So i have to search the parent theme’s each file one by one?

In the demo the slider is on the homepage, so I assume you should look for index.php or maybe home.php file for get_template_part.

All the best,
Kris

by
by
by
by
by
by