fix: remove block library
This commit is contained in:
parent
c72318ccd3
commit
8cafa6cbfb
4 changed files with 49 additions and 2 deletions
|
@ -14,6 +14,7 @@ include(TEMPLATEPATH . '/functions/profile-extra-fields.php');
|
|||
include(TEMPLATEPATH . '/functions/romans.php');
|
||||
include(TEMPLATEPATH . '/functions/reading-time.php');
|
||||
include(TEMPLATEPATH . '/functions/cat-template.php');
|
||||
include(TEMPLATEPATH . '/functions/remove-block-library.php');
|
||||
|
||||
function wpb_custom_new_menu() {
|
||||
register_nav_menus(
|
||||
|
|
11
functions/remove-block-library.php
Normal file
11
functions/remove-block-library.php
Normal 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 );
|
||||
?>
|
|
@ -40,5 +40,24 @@
|
|||
&.size-full,
|
||||
&.size-large {
|
||||
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;
|
||||
}
|
||||
}
|
18
style.css
18
style.css
|
@ -3050,7 +3050,23 @@ ul.social {
|
|||
margin-bottom: 0.4rem; }
|
||||
|
||||
.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 {
|
||||
position: fixed;
|
||||
|
|
Reference in a new issue