How would I go about replacing this function in my child theme located in inc/template-tags.php

How would I replace this function that lies inside inc/template-tags.php in my parent theme

function theme_navigation() {
?>
        
        <div id="theme-nav-container">
            <nav id="site-navigation" class="main-navigation">
                <?php wp_nav_menu( array('theme_location' => 'theme-studios-primary', 'menu_class' => 'sf-menu', 'fallback_cb' => false, 'walker'  => new theme ) ); ?><div class="clearfix-pro"></div>
            </nav>
            <div class="clearfix-pro"></div>
        </div>
        
        <!-- close #theme-nav-container -->
        
        
<?php
}

There is no add action that it is hooked on to, there is no check to see if the function already exists. How would I replace it without touching the parent theme. I have removed much of the code in the function for brevity but I think it still makes sense.

Thanks ahead of time

Go to Source
Author: Anders Kitson

Child theme overirde template-tags in a theme built on underscores in inc/template-tags

I’ve read this post and I don’t think this question is a duplicate because I have a specific question that has not been answered.

My parent theme is using the following to require a template tag php file

require get_template_directory() . '/inc/template-tags.php';

Is it possible to overide this in my child theme, If I place the same code in my functions.php and place the folder and file the same in my child theme folder I get a error saying

 Fatal error: Cannot redeclare progression_studios_category_transient_flusher() (previously declared in /home/anders/Local Sites/site/app/public/wp-content/themes/vayvo-progression-child/inc/template-tags.php:401) in /home/anders/Local Sites/site/app/public/wp-content/themes/vayvo-progression/inc/template-tags.php on line 401

Is it possible to work around this.

Thanks ahead of time.

Go to Source
Author: Anders Kitson

WordPress childtheme not loading any CSS/SCSS

I’m using the BigFoot theme and I’ve made a child theme from this. I’ve set everything up, my child theme is activated in the wp-admin and everything looks good but for some reason my page isn’t loading any CSS.

I’m writing SCSS and converting it into CSS with a build task, when I run the build task it succesfully compiles the SCSS to CSS.

This is my functions.php page

add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
//deze code laadt de CSS van de PARENT get_template_directory_uri()
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
//laadt ook de  eigen CSS

wp_enqueue_style( 'child-style', get_stylesheet_directory_uri(  ) . '/css/screen.css', array('parent-style', 'bigfoot-style', 'bigfoot-css'), wp_get_theme()->get('Version'));

}

This is the style.css page

/*
Theme Name:   Bigfoot Child
Theme URI:    ***************
Description:  Bigfoot Child Theme
Author:       ***************
Author URI:   ***************
Template:     bigfoot
Version:      1.0.0
License:      GNU General Public License version 3.0
License URI:  http://www.gnu.org/licenses/gpl-3.0.html
Tags:         light, two columns
Text Domain:  bigfootchild
*/

I’ve already tried a bunch of solutions I found online but none of them seem to be working. Any idea on what I’m doing wrong?

Any help would be highly appreciated!

Go to Source
Author: Maxim