Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Child themed template-tags.php

The theme I use has an inc/template-tags.php file that I

need to override with a child template-tags.php

Adding the file into my child theme folder both inc/ folder based and root child theme folder does not seem to override the parent file.

Adding include( get_stylesheet_directory() . '/inc/template-tags.php' ); to my child functions.php result in WordPress white screen of death.

Anyone know how to do this?

like image 581
webmaster alex l Avatar asked Apr 22 '26 20:04

webmaster alex l


1 Answers

answer was in using the following inside child functions.php

if( ! function_exists(twentyfourteen_post_nav) ) { function twentyfourteen_post_nav() { DUMP MY EDITED CODE HERE }}

like image 83
webmaster alex l Avatar answered Apr 24 '26 10:04

webmaster alex l



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!