Tagged: theme update
-
AuthorPosts
-
July 7, 2015 at 5:34 pm #469846
Hi Kriesi,
I am able to acquire the purchase ID and would like to ask your advise to update our old version to the latest.
These are our current scenario:
- Enfold version is 2.8.1
- The following files had been modified w/o creating a child theme folder:
- functions.php
- functions-enfold.php
- custom.css
- There are some other I believe that were modified directly
I have 3.2 running in our dev server but things are broken like the modal pop up won’t work on images after activating it in the admin panel, images are missing in the posts (this could be server related though).
My main concerns are:
- How will I update the theme without breaking the functionality it already have from the current build?
- The listed file changes were the ones I could think of but what if there are other files that were modified?
- If I create a child theme folder and placed the modified files there, will it break my company’s website?
Please advise soonest and thank you!
July 7, 2015 at 6:04 pm #469873If you could also grant me the Enfold theme files for version 2.8.1 so I can manually compare side by side the difference between my version and yours, that will be really helpful!
July 7, 2015 at 10:47 pm #469973Hi Kriesi,
I’ve installed 2.8.1 in my dev environment. The following files were modified from the parent:
C:\wordpress\wp-content\themes\enfold\css\custom.css
C:\wordpress\wp-content\themes\enfold\js\avia.js
C:\wordpress\wp-content\themes\enfold\footer.php
C:\wordpress\wp-content\themes\enfold\functions.php
C:\wordpress\wp-content\themes\enfold\header.php
C:\wordpress\wp-content\themes\enfold\single.phpI installed the latest WP and the latest Enfold theme (3.2).
I then compared the theme files from 2.8.1 to 3.2 and found out a lot had been changed since.
However, I still did create the child-theme in my dev environment.
The issue is that when I use my 2.8.1 functions.php file in the child-theme, I get a blank page unless I delete it’s content.What should I do to keep the 2.8.1 functions file and use it from now on?
July 8, 2015 at 3:03 pm #470309Hey!
You would not be able to move the parent functions.php file to the child theme folder. What you’ll need to do is add the changes to your child theme functions.php file.
This isn’t as simple as copying the changes over though. Depending on the exact customizations done you will want to utilize hooks or override functions.
I recommend reading this, http://themeshaper.com/modify-wordpress-themes/, for how to use hooks.
And for overriding functions open up the functions-enfold.php file. You see how the functions are surrounded with something like this?
if(!function_exists('avia_preload_screen')) { }
When they are surrounded with that then you can copy the whole function to your child theme functions.php file and edit it however you need and it will be used instead.
As for the header.php, single.php, and footer.php, those are actual template files so you can copy them over to your child theme folder and they will be used instead of the parent theme versions. You’ll want to make sure to use the updated files from Enfold 3.2.3 though as they may have been changed.
And for the CSS and JS files such as avia.js, shortcodes.js, etc etc, see here, https://kriesi.at/support/topic/use-avia-js-in-child-theme/#post-230498.
Cheers!
Elliott- This reply was modified 9 years, 5 months ago by Elliott.
-
AuthorPosts
- You must be logged in to reply to this topic.