I started to create a child theme from a BoldThemes theme with custom icons. I am able to see icons when edit directly page,

enter image description here

but when try to edit page from wp admin, I've this issue

enter image description here

I discovered with DevTools when I try to edit page from wp admin, system don't load assets from child but only from original theme

This is my functions.php

function my_theme_enqueue_styles() {

    $parent_style = 'parent-style';

    wp_enqueue_style( $parent_style, get_parent_theme_file_uri( 'style.css' ) );
    wp_enqueue_style( 'child-style',
        get_theme_file_uri( 'style.css' ),
        array( $parent_style ),
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );


Other info WordPress version wordpress:5.9.0-php8.0-apache ( docker enviroment )

I follow official documentation for create my cutom icons

I copied admin-style.php from theme to child and added this line

@font-face{font-family:"Chess"; src:url("' . get_stylesheet_directory_uri() . '/fonts/Chess/Chess.woff") format("woff"),url("' . get_stylesheet_directory_uri() . '/fonts/Chess/Chess.ttf") format("truetype");}
*[data-ico-chess]:before{ font-family: Chess; content:attr(data-ico-chess); }
.bt_bb_icon_preview.bt_bb_icon_preview_chess { font-family:Chess; }

and the same for icons.php

@font-face{  font-family:"Chess"; src:url("' . get_stylesheet_directory_uri() . '/fonts/Chess/Chess.woff") format("woff"),url("' . get_stylesheet_directory_uri() . '/fonts/Chess/Chess.ttf") format("truetype");
}  *[data-ico-chess]:before{ font-family:Chess; content:attr(data-ico-Chess); }
.bt_bb_icon_preview.bt_bb_icon_preview_chess{ font-family:Chess; }

If copy all in original theme work all, but I want know if is possible resolve this problem with child theme ?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.