14 posts
  • Bought between 10 and 49 items
  • Greece
  • Has been a member for 3-4 years
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!

553 posts Fuel Your Web
  • Elite Author
  • Won a Competition
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Has been a member for 7-8 years
  • Bought between 50 and 99 items
  • Referred between 200 and 499 users
  • Europe
Pirenko says

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

14 posts
  • Bought between 10 and 49 items
  • Greece
  • Has been a member for 3-4 years
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?

3192 posts
  • Sold between 5 000 and 10 000 dollars
  • United States
  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
  • Exclusive Author
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
  • Bought between 10 and 49 items
  • Greece
  • Has been a member for 3-4 years
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

279 posts
  • Sold between 50 000 and 100 000 dollars
  • Exclusive Author
  • Has been a member for 1-2 years
  • Bought between 10 and 49 items
  • Referred between 10 and 49 users
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
  • Bought between 10 and 49 items
  • Greece
  • Has been a member for 3-4 years
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!!
279 posts
  • Sold between 50 000 and 100 000 dollars
  • Exclusive Author
  • Has been a member for 1-2 years
  • Bought between 10 and 49 items
  • Referred between 10 and 49 users
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
  • Bought between 10 and 49 items
  • Greece
  • Has been a member for 3-4 years
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?

529 posts
  • Bought between 10 and 49 items
  • Envato Studio (Microlancer) Beta Tester
  • Estonia
  • Exclusive Author
  • Has been a member for 4-5 years
  • Most Wanted Bounty Winner
  • Sold between 100 and 1 000 dollars
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