• Resolved ArtGoddess

    (@artgoddess)


    Hello,

    I’m using a Twenty Twenty-One 1.4 child theme, with only three files: functions.php, screenshot.png and style.css.

    I don’t want to copy “header.php” in folder, in case I miss Twenty Twenty-One theme future updates.

    Is it possible to call the breadcrumb from the “mychildtheme/functions.php” file?

    Many thanks!

Viewing 1 replies (of 1 total)
  • This is quite possible if your theme has an action hook to display custom output under header area,

    add_action('yourthemes_header', 'yourthemes_header_20200203');
    
    if(!function_exists('yourthemes_header_20200203')) {
        function yourthemes_header_20200203(){
    
          echo do_shortcode("[breadcrumb]"); 
    
        }
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘Call breadcrumb from functions.php’ is closed to new replies.