Skip to content

Instantly share code, notes, and snippets.

@dovy
Last active December 22, 2015 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dovy/6502088 to your computer and use it in GitHub Desktop.
Save dovy/6502088 to your computer and use it in GitHub Desktop.
Showing you how to add to or override the Redux CSS values.
<?php
function addAndOverridePanelCSS() {
wp_dequeue_style( 'redux-css' );
wp_register_style(
'redux-custom-css',
'http://urltomyfile',
array( 'farbtastic' ), // Notice redux-css is removed and the wordpress standard farbtastic is included instead
time(),
'all'
);
wp_enqueue_style('redux-custom-css');
}
// This example assumes your opt_name is set to redux_demo, replace with your opt_name value
add_action('redux-enqueue-redux_demo', 'addAndOverridePanelCSS');
<?php
function addPanelCSS() {
wp_register_style(
'redux-custom-css',
'http://urltomyfile',
array( 'redux-css' ), // Be sure to include redux-css so it's appended after the core css is applied
time(),
'all'
);
wp_enqueue_style('redux-custom-css');
}
// This example assumes your opt_name is set to redux_demo, replace with your opt_name value
add_action('redux-enqueue-redux_demo', 'addPanelCSS');
<?php
function removePanelCSS() {
wp_dequeue_style( 'redux-css' );
}
// This example assumes your opt_name is set to redux_demo, replace with your opt_name value
add_action('redux-enqueue-redux_demo', 'removePanelCSS');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment