-
AuthorPosts
-
February 12th, 2014 at 21:25 #22046Jan
Hi there,
first of all, thank you for the great theme! I just have a small problem and would like your input on it.
I needed to change a function in theme-function.php. No big deal, works fine. But since I decided to use a child theme in order to keep it clean and easy to update I couldn’t find a way to “override” the function.
Is there a way to change / override a function using a child theme without modifying the parent theme? Otherwise I feel like, I’m losing the purpose of the whole child theme thing.
Thank you for any advise!
Jan
March 9th, 2014 at 22:38 #24280DavidI’m pretty much a WordPress newbie, so anything I offer may be wrong. Nonetheless, I wanted to make a change to the presentation page layout and found, within my mantra-child directory, an ‘includes’ directory containing theme-frontpage.php. ‘includes’ did not contain any other files, but if edits to includes/theme-frontpage.php would work, I’d THINK you could duplicate theme-function.php there.
However, when I edited theme-frontpage.php, it didn’t result in any changes to the site, so…?
April 20th, 2014 at 19:23 #24918David GI would suggest creating a child-theme for your site. You will have 2 files in the directory – Style.css and functions.php. Then you can edit those to override the theme functions and styles. One benefit of a child theme is that when you update the main theme, you do not lose the customizations you have created. I suggest going to the WP site and search how to create a child-theme. It isn’t hard and there are plugins you can use also to achieve your goals. I use the plugin (Child Themify) but it doesn’t create the functions.php file although that is easy enough using a FTP program to add that.
I hope that helps. -
AuthorPosts
The topic ‘change function in theme-function.php using a child theme’ is closed to new replies.