Site logo

[Resolved] How to over write inc/template-tags.php in my child theme?

Home Forums Support [Resolved] How to over write inc/template-tags.php in my child theme?

Home Forums Support How to over write inc/template-tags.php in my child theme?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #166369
    Pete

    How do I over write the inc/template-tags.php file in my child theme?

    #166420
    Tom
    Lead Developer
    Lead Developer

    I wouldn’t do that – it can cause big problems for future updates when I add more functions in there and call those functions elsewhere (you’ll get an undefined function fatal error).

    Every function in that file is wrapped in a function_exists() function, which means you can copy the entire function (including the function_exists() part) and add it to your child theme/plugin and it will overwrite the core function.

    That’s definitely the way you should go about it 🙂

    #166421
    Pete

    Thanks Tom, that worked perfectly!

    #166422
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.