Skip to content

Instantly share code, notes, and snippets.

@flexseth
Last active August 29, 2015 14:10
Show Gist options
  • Save flexseth/6ec504eb530112006829 to your computer and use it in GitHub Desktop.
Save flexseth/6ec504eb530112006829 to your computer and use it in GitHub Desktop.
WordPress Plugin Style Overrides
/** My custom plugin CSS
*
* This file should be in plugins/myplugins, additionally
* you should include the add-to-functions.php code to your
* functions.php file to initialize this stylesheet after
* your plugin styles are set, making it easier to
* edit plugin styles.
**/
/** Your custom plugin style overrides below... **/
<?php
/**
* WordPress Plugin Style Overrides.
*
* @package Flex Perception add-ons
* @since 1.0.0
* @copyright Copyright (c) 2014, Flex Perception
* @license GPL-2.0+
*/
/** Add the following code to your functions.php file **/
//* Register extra plugin styles **/
add_action( 'wp_enqueue_scripts', 'my_register_custom_plugin_styles' );
/**
* Register style sheet.
*/
function my_register_custom_plugin_styles() {
wp_register_style( 'my-plugin-styles', plugins_url( 'myplugins/plugins-custom.css' ) );
wp_enqueue_style( 'my-plugin-styles' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment