My WP theme's parent functions.php has
require get_template_directory() . '/inc/template-tags.php';
inside that file is a function I want to change. The problem is there's a bunch of other functions in there that I don't want to touch. I could just copy the whole file into child theme and unregister/unequene that file. I was wondering if there is an easier way.
inside template-tags.php the function I want to change values in is called
function web2feel_content_nav( $nav_id ) {
... content i want to change in here
endif; // web2feel_content_nav
It is called in my single.php file using
<?php web2feel_content_nav( 'nav-below' ); ?>
It was easy to just change the parent file, but I don't want to touch the parent, so I just want to override that one function and change it to the new/fixed one.
Aucun commentaire:
Enregistrer un commentaire