Skip to content

Instantly share code, notes, and snippets.

@gschoppe
Created January 7, 2017 15:34
Show Gist options
  • Save gschoppe/176b263f13c6f7bdc6f0cdf8b9ef26e4 to your computer and use it in GitHub Desktop.
Save gschoppe/176b263f13c6f7bdc6f0cdf8b9ef26e4 to your computer and use it in GitHub Desktop.
Customize Blockade for your theme
<?php /* place in functions.php */
add_action( 'after_setup_theme', 'my_theme_setup' );
function my_theme_setup() {
add_editor_style(); // We recommend using an editor-style.css file , that includes all the styles that will apply to the content
add_theme_support( 'wp-blockade' ); // This tells Blockade that your theme includes Bootstrap
// add_theme_support( 'bootstrap', '3.3.7' ); // alternatively, you can just register bootstrap support, along with your version number
$palette = array( // set the colors available in the editor's colorpickers
'Primary' => '#811381',
'Black' => '#000000',
'White' => '#FFFFFF',
'Green' => '#00FF00',
'Red' => '#FF0000',
'Blue' => '#0000FF',
);
add_theme_support( 'wp-blockade-palette', $palette, false ); // the third parameter enables or disables the "custom color" option
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment