Sign Up

Browse


Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.


Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

WP Ask

WP Ask Logo WP Ask Logo

WP Ask Navigation

  • Home
  • Recent Questions
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • Questions
    • Recent Questions
  • Communities
  • Polls
  • Home
  • Recent Questions
  • Contact Us
Home/ Questions/Q 303
Next
Answered

WP Ask Latest Questions

kargaelo
  • 6
  • 6
kargaelo
Asked: September 26, 20202020-09-26T10:27:34+08:00 2020-09-26T10:27:34+08:00In: Themes

How to add header.php to child theme?

  • 6
  • 6

Hi guys, I’m a newbie in WordPress. I am trying to integrate a widget on my site and it tells me to add a script to header.php file but I can’t seem to find the file on my child theme. Should I add the code to the parent theme header.php or I create header.php file in child theme which I don’t know how?

Thanks in advance guys.

child themesheader.phpthemes
  • 4 4 Answers
  • 212 Views
  • 0 Followers
  • 0
  • Share
    Share
    • Share on Facebook
    • Share on Twitter

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

4 Answers

  • Voted
  • Oldest
  • Recent
  1. aldinlapinig
    Best Answer
    aldinlapinig
    2020-09-26T10:34:07+08:00Added an answer on September 26, 2020 at 10:34 am
    This answer was edited.

    Hi kargaelo!  First of all, welcome to the community, buddy. I hope you enjoy your stay here.

    Regarding your question, I think the easiest way to do this is to create a copy of the template files you want to change from the parent theme, in this case the header.php,  then make your modifications to the copied files. This way you will not be affecting or changing the parent files.

    For more info about WordPress child themes, you may refer to this documentation.

    https://developer.wordpress.org/themes/advanced-topics/child-themes/

    Hope that helps.

      • 1
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  2. kargaelo
    kargaelo
    2020-09-26T10:41:52+08:00Added an answer on September 26, 2020 at 10:41 am

    Wow, aldinlapinig! That was quick. I saved time. Thank you for helping out.

      • 1
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
    • aldinlapinig
      aldinlapinig
      2020-09-30T12:05:04+08:00Replied to answer on September 30, 2020 at 12:05 pm

      Glad to help, kargaelo.

        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
  3. kyle
    kyle
    2020-12-27T10:39:20+08:00Added an answer on December 27, 2020 at 10:39 am

    this is the quickest solution i have seen while searching about this topic. thank you for sharing.

      • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp

Sidebar

Most Popular Theme

aalan

Blazing Fast Cloud Hosting

aalan

Explore

  • Home
  • Questions
    • Recent Questions
  • Communities
  • Polls

© 2024 WP Ask. All Rights Reserved.
Powered by Ako.ph.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.