[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]
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 );