Is anyone else having problems exporting an FSE theme?

[ad_1]

I was working with localwp in a FSE theme and when I tried to export it to my live site, the .zip downloaded is damaged and I can’t open it.

Idk if this is a bug or something in my code is wrong ( I don’t think so, as I only used the block editor to create this theme ).

[ad_2]
1 Comment
  1. I figured out the problem is in my functions.php but I have no idea where exactly:

    <?php

    function niliraEnqueueStylesheets() {
    $stylesheet_url = get_template_directory_uri() . ‘/style.css’;
    wp_enqueue_style(
    ‘nilira-styles’,
    $stylesheet_url,
    array(),
    filemtime(get_template_directory() . ‘/style.css’)
    );
    }

    add_action(‘wp_enqueue_scripts’, ‘niliraEnqueueStylesheets’);

    function niliraEnqueueEditorStyles() {
    add_editor_style(‘style.css’);
    remove_theme_support( ‘core-block-patterns’ );
    }

    add_action(‘after_setup_theme’, ‘niliraEnqueueEditorStyles’);

    function niliraAddPatternCategories() {

    $block_pattern_categories = array(
    ‘nilira/hero’ => array(
    ‘label’ => __( ‘Hero’, ‘nilira’ ),
    ),
    ‘nilira/about’ => array(
    ‘label’ => __( ‘About’, ‘nilira’ ),
    ),
    ‘nilira/blog’ => array(
    ‘label’ => __( ‘Blog’, ‘nilira’ ),
    ),
    ‘nilira/services’ => array(
    ‘label’ => __( ‘Services’, ‘nilira’ ),
    ),
    ‘nilira/cta’ => array(
    ‘label’ => __( ‘CTA’, ‘nilira’ ),
    ),
    ‘nilira/topics’ => array(
    ‘label’ => __( ‘Topics’, ‘nilira’ ),
    )
    );

    foreach ( $block_pattern_categories as $name => $properties ) {
    register_block_pattern_category( $name, $properties );
    }
    }
    add_action( ‘init’, ‘niliraAddPatternCategories’, 9 );

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer