fix: remove block library

This commit is contained in:
Kazhnuz 2023-10-04 15:30:00 +02:00
parent c72318ccd3
commit 8cafa6cbfb
4 changed files with 49 additions and 2 deletions

View file

@ -14,6 +14,7 @@ include(TEMPLATEPATH . '/functions/profile-extra-fields.php');
include(TEMPLATEPATH . '/functions/romans.php'); include(TEMPLATEPATH . '/functions/romans.php');
include(TEMPLATEPATH . '/functions/reading-time.php'); include(TEMPLATEPATH . '/functions/reading-time.php');
include(TEMPLATEPATH . '/functions/cat-template.php'); include(TEMPLATEPATH . '/functions/cat-template.php');
include(TEMPLATEPATH . '/functions/remove-block-library.php');
function wpb_custom_new_menu() { function wpb_custom_new_menu() {
register_nav_menus( register_nav_menus(

View file

@ -0,0 +1,11 @@
<?php
//Remove Gutenberg Block Library CSS from loading on the frontend
function smartwp_remove_wp_block_library_css(){
wp_dequeue_style( 'wp-block-library' );
wp_dequeue_style( 'wp-block-library-theme' );
wp_dequeue_style( 'wc-blocks-style' ); // Remove WooCommerce block CSS
wp_deregister_style( 'dashicons' );
add_filter( 'show_admin_bar', '__return_false' );
}
add_action( 'wp_enqueue_scripts', 'smartwp_remove_wp_block_library_css', 100 );
?>

View file

@ -40,5 +40,24 @@
&.size-full, &.size-full,
&.size-large { &.size-large {
text-align: center; text-align: center;
margin:auto;
} }
} }
.wp-block-gallery {
display:flex;
justify-content: space-between;
align-items: start;
.wp-block-image {
width: 220px;
text-align: center;
align-self: start;
}
img {
width:200px;
height:200px;
object-fit: cover;
display:block;
margin:auto;
}
}

View file

@ -3050,7 +3050,23 @@ ul.social {
margin-bottom: 0.4rem; } margin-bottom: 0.4rem; }
.wp-block-image.size-full, .wp-block-image.size-large { .wp-block-image.size-full, .wp-block-image.size-large {
text-align: center; } text-align: center;
margin: auto; }
.wp-block-gallery {
display: flex;
justify-content: space-between;
align-items: start; }
.wp-block-gallery .wp-block-image {
width: 220px;
text-align: center;
align-self: start; }
.wp-block-gallery img {
width: 200px;
height: 200px;
object-fit: cover;
display: block;
margin: auto; }
#mobile-sidebar { #mobile-sidebar {
position: fixed; position: fixed;