YOUR CART: 0 products
Home › SUPPORT FORUMS › JOOP WordPress theme › Modify a PHP file in JOOP Child Theme
This topic contains 3 replies, has 2 voices, and was last updated by
kevin(Staff) 1 day, 19 hours ago.
-
AuthorPosts
-
25/04/2014 at 1:40 AM #63407
Hi,
I was wondering if it’s possible to modify a php file inside ‘tdframework’ or ‘woo commerce’ directory on my JOOP child theme. I was trying this and it didn’t worked out. Is there a way to get this working, or do I have to modify the original file?Thanks for your support
25/04/2014 at 9:27 AM #63409Hi Calaveras,
The way child themes work is not really a theme-related thing, but here is how I believe these things work:
there are two different things that can be done with PHP files.
-First there’s the functions.php file (which is a special case).
When you make a functions.php file in your child theme, any functions you will create there will be loaded in addition to the parent theme’s functions. More specifically (if I’m not mistaken) they are loaded before your parent theme’s functions.
For this particular file, you’ll want to start with an empty file named functions.php-Secondly, there’s the theme php-files
Other php files from the parent theme, such as archive.php, header.php etc will be completely overridden when a file with the same name exists in the child theme. That means that all the parent’s php in that file will be disregarded and replaced by the child’s php.
For these other files, if you are planning to make changes to the php, not completely rewrite a file. You’ll want to start by loading a copy of the file from the parent’s theme into your child theme and the altering thatTo make this complete, child theme css files are loaded after the parent theme’s css files have been loaded, so that they will overwrite any css from the parent’s files that may affect the same elements.
I hope this helps,
Kind regards,
Kevin26/04/2014 at 1:23 AM #63422The problem is that I tried that, by making a copy of this file and pasting it on my child theme. Didn’t worked out. The file that I’m modifying specifically is core-sociables.php on tdframework/core
Hope if there’s a way to get this, if not, I will modify the original file.
Regards
26/04/2014 at 2:37 PM #63429Hi Calaveras,
Just to be sure..
Have you also replicated the directory structure in your child theme by placing it in tdframework\core\ in your child theme as well?It probably won’t recognize it to be the same file if you don’t do that.
Kind regards,
Kevin -
AuthorPosts
You must be logged in to reply to this topic.






