• I have used your block theme plugin and till couple of weeks ago it was working fine then now suddenly when I export the theme its not exporting header and footer.
    I have spent all day, I cleared browser cache. I cleared removed all files on computer /downloads folder with the theme name to avoid conflicts but nothing works.

    Also the theme home page when i checked its html its directing to a pattern called home.php which is hidden.

    Do you guys have any answer for this.

Viewing 3 replies - 16 through 18 (of 18 total)
  • Aside from being sure to have the same Theme Name / Slug / Text Domain — I’m starting to think some problems I was [and at time still am] experiencing has to do with a need to code add_theme_support() in the theme’s functions.php file.

    I was trying to create header and footer template parts with a custom logo and had nothing (in functions.php) to tell WordPress to support it, e.g. –

    add_theme_support( 'custom-logo', 
           array( 'height' => 125, 
                  'width' => 500, 
      )
    );

    I also was trying to have a navigation menu in my header and foot, (which always disappeared), so I added —

    add_theme_support( 'menus' );
    //
    function lexinews_reg_menus() {
    	register_nav_menus(
            array(
                'navt-menu' => _( 'Top Nav Menu' ),
                'navb-menu' => _( 'Bottom Nav Menu')
            )
        );
    }
    add_action( 'init', 'lexinews_reg_menus' );
    //

    I think not having that was causing the FSE to encounter a “Navigation” block and telling me “You do not have permission to edit menu” or “Menu no longer exists” or other messages I was getting from my disappeared menus… (Sorry for not giving better bug report of exact error message or when & why they occurred).

    But I could be completely wrong and have no idea if I am going about building a Block Theme correctly — too many moving parts….

    I also observe the same symptoms.

    Upon checking the output code view, it is necessary to modify the part that says <!– wp:template-part {“slug”:”header”} /–> to <!– wp:template-part {“slug”:”header”,”theme”:”mytheme”} /–>.

    Additionally, my development environment is Local.

    I will add this to the report.

    • This reply was modified 1 year, 4 months ago by buzzlyhan.
    • This reply was modified 1 year, 4 months ago by buzzlyhan.
    Thread Starter Mohammed

    (@khangood)

    Hi @pbking

    thus the solution there is to NOT include any?template-part?blocks in patterns.

    I create the header and footer from scratch didn’t include any template part blocks in patterns, clone the theme under a different name using CBT. Uploaded it on another site.

    The result is same, header and footer are missing and same error is showing up.

    Any other ideas? or fix.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Block theme not exporting header and footer’ is closed to new replies.