Home Forums WoodMart support forum Create header.php for child theme

Create header.php for child theme

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #156564

    Oriol Duarri
    Participant

    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!

    #156573

    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

    #156664

    Oriol Duarri
    Participant

    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?

    #156689

    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

    #156720

    Oriol Duarri
    Participant

    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,

    #156731

    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

    #156753

    Oriol Duarri
    Participant

    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/

    #156881

    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

    #156886

    Oriol Duarri
    Participant

    Done!

    Thanks

    #156895

    You are welcome! If you have any questions please feel free to contact us.

    Best Regards

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Create header.php for child theme’ is closed to new replies.