Create header.php for child theme
-
Hi,
I need help for know how to create a header.php file for the woodmart child template in order to make changes on it and don’t lose it with the updates,
I need to ad a code at the head and other one at the body,
Thanks!
Hello,
You need to install and activate the child theme and configure it. When you update the parent theme all the changes would remain. In any case, make the full backup of your site before updating and update the parent theme.
Best Regards
hi,
I’m working with child theme but just have style.css and functions.php files, how I include the header.php file to the child theme?
Hello,
You do not need this. You configure the header in the Header builder, please read and follow the instruction: https://xtemos.com/docs/woodmart/header-builder/
If you need to customize anything, you add the php code to functions.php, if you want to add JS you add to the Theme Settings > Custom JS, if you want to add CSS you add to the Theme Settings > Custom CSS. If you need to configure the theme and Header builder you just do it, and when you update the parent theme correctly all your settings would remain.
Best Regards
Hi Elise,
I’m needing to put this codes: http://prntscr.com/pwdx73
I know how to insert code to header from functions.php but don’t know how to insert code to the body,
Hello,
Please install and use the free plugin Insert Headers and Footers for the purpose https://wordpress.org/plugins/insert-headers-and-footers/
Best Regards
Hi,
I have tried this plugin before but it’s impossible to insert content in body section with plugins, wordpress have released a new action called body open but the theme must support it for being able to use it on an snippets plugin
https://generatewp.com/wordpress-5-2-action-that-every-theme-should-use/
Hello,
You can just copy the file header.php in the same folder of the child theme and then edit as per your needs.
Best Regards
You are welcome! If you have any questions please feel free to contact us.
Best Regards
The topic ‘Create header.php for child theme’ is closed to new replies.