Last active
March 15, 2021 18:05
-
-
Save drdogbot7/26d26abc59b4131eb2d463fc5c09285f to your computer and use it in GitHub Desktop.
Register sidebar style for wordpress 'group' block.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package LT_block_styles | |
* @version 0.1.0 | |
*/ | |
/* | |
Plugin Name: Lawrence Times Block Styles | |
Description: Register Custom Block styles for The Lawrence KS Times | |
Author: Jeremy Mullis | |
Version: 0.1.0 | |
Author URI: https://github.com/drdogbot7/ | |
*/ | |
function register_block_styles() | |
{ | |
register_block_style('core/group', [ | |
'name' => 'sidebar', | |
'label' => __('Sidebar'), | |
'inline_style' => | |
'@media screen and (min-width:740px) { .is-style-sidebar { float: right; width:40%; margin-left:30px; margin-bottom:30px; } }', | |
]); | |
} | |
add_action('after_setup_theme', 'register_block_styles'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Download file and use as plugin, or copy/paste line 14 on into your theme's functions.php