Bring Your Business to Life › Support › Image Store › How can I dequeue some of the css styles?
Tagged: css
- AuthorPosts
- June 18, 2014 at 8:26 am #150358yoderman94Member
I want to pull the css styles into my style sheet but I need to dequeue the Image Store sheets. I have tried:
wp_deregister_style ( ‘imstore’);
wp_dequeue_style( ‘imstore’);wp_register_style ( ‘css-imstore’, get_stylesheet_directory_uri() . ‘/vendor/image-store/css/imstore.css’, ‘imstoreCSS’ );
wp_enqueue_style( ‘css-imstore’);This will load the new style but the old style remains loaded which is causing conflicts.
I realize that I can turn off the css in the options but shouldn’t there be a way to do it through code so I don’t have to recreate every css file?
Thanks!
Chad
June 23, 2014 at 12:31 am #152725Xpark MediaKeymasterDo you want to remove all or just some? To dequeue files, the dequeue function needs to run after image store has queued the styles.
If you want to remove all css, just go to settings > general and uncheck “Use CSS”
To dequeue some try:
function dequeue_image_store_styles(){ wp_dequeue_style('imstore'); wp_dequeue_style('ims-single'); wp_dequeue_style('imstore-store'); } add_action( 'wp_enqueue_scripts', 'dequeue_image_store_styles', 100 );
- AuthorPosts
- You must be logged in to reply to this topic.