Okay
  Public Ticket #2608702
modify page-header.php file in child theme
Closed

Comments

  •  3
    Vishal Dogra started the conversation

    I have copy nectar folder in my child-theme and try to modify the page-header.php file in helpers which is inside nectar folder but the changes are not reflecting  and if i directly modify changes in the page-header-php file in salient theme itself they reflect . 

  •  8,938
    Tahir replied

    Hey Vishal, 

    Please see our Dev Guide for information on what changes can be made via a Child Theme: http://themenectar.com/docs/salient/developer-docs/ . 

    Thanks


    ThemeNectar Support Team 

  • wildeamsterdam replied

    Hello, 
    I actually repeat the same question, the link is focusing on the Salient elements, not the page-header (for post- single template). I'm trying to override the post single template fullwidth header by adding the excerpt under the post title. I noticed this is coming from the file page-header in the nectar/helpers/page-header because when I edit it from the Salient theme folder, the changes appear. I tried different ways but never found a way to override it in my child theme. 
    Unfortunately, the developer documentation is very poor :/
    Hope you can shed light on that!
    Thank you for your help, 
    Charlotte

  •  8,938
    Tahir replied

    Hey 

    The whole "nectar_page_header" function can be overwritten by pasting it in a Child Theme and customizing it as needed: 

    6327240890.pngClick To Open Larger Image.

    Thanks


    ThemeNectar Support Team 

  • wildeamsterdam replied

    Hey Tahir, 
    Thank you! It's working!! 
    Best,

  • jtheun replied

    Do you just copy this function into your functions.php file of your child theme and edit it there?

  •  8,938
    Tahir replied

    @jtheun,

    Yes thats correct.

    Best


    ThemeNectar Support Team 

  •  4
    madamaimadam replied

    The referenced docs are not covering this specific case and the support provided is vague. We just need to "modify page-header.php file in child theme". This is typically done by using the exact file path a specific file alternate file path with other themes I have used in the past. 

    The part Tahir mentions with copying the function from the page-header.php template into the child theme functions.php is quite vague. I managed to hack a solution in the end in my functions.php file but this is not ideal compared to a normal template override method. A better set of documentation is at the least requested.

  •  8,938
    Tahir replied

    @madamaimadam ,

    Were you able to copy paste that function in the Child theme and make amends to the Page Header ?. 

    Thanks


    ThemeNectar Support Team 

  •  1,085
    ThemeNectar replied

    Hey madamaimadam,

    While WordPress does offer the ability to override template files via a child theme by copying them into the directory,  the page-peader.php file is a collection of functions rather than a standard template file. This type of file can't be copied into a child theme to override in that fashion. However, you can indeed copy the desired functions from the file into your child theme for modification. 

    Kindly let me know if you need assistance with that.