• Resolved lassial358

    (@lassial358)


    This may be a stupid question,
    but I was expecting to be able to override parent theme functions by placing the new function in, e.g.

    /child-theme/inc/template-tags.php

    however, this did not seem to do the work, so I placed the custom functions in

    /child-theme/functions.php

    I found no clear tip on this, for instance template-tags.php says (ln 415-416)
    ” * To override this walker in a child theme without modifying the comments template
    * simply create your own tinyframework_comment(), and that function will be used instead.”

    I would specify WHERE you should create the override functions in.

    Thanks,
    L

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Tomas Mackevicius

    (@tomasm)

    The thing is that it doesn’t really matter where the function is located, as long as it is loaded (sometimes loaded at appropriate timing).

    I’m surprised that placing this file didn’t work, I would have to try it my self, but you did right thing, placing it in fuctions.php

    In terms of tips, I don’t have personally such capacity of free time to write WordPress generic instructions and trying to cover mostly theme related aspects. Your questions are general in their scope, this on the other hand makes it easier to find relevant info, for example you can search:

    https://www.google.com/search?q=override+template-tags.php+in+child+theme&ie=utf-8&oe=utf-8

    BTW you got some beautiful ideas in implementing full width child theme!

    Thread Starter lassial358

    (@lassial358)

    I understand the limitations, in this case, just adding two words in

    simply create your own tinyframework_comment(),

    to

    simply create your own tinyframework_comment() to functions.php,

    would have solved the confusion.

    Thanks for the compliment on customization, I’m still in the process of tweaking the theme, but please feel free to reference it after February once the site officially launches!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Overriding /inc functions in a child theme’ is closed to new replies.