Hello,
I am creating a plugin that improves the user interface for admin backend Page Builder SiteOrigin. To make changes, I first edited the file css/admin.css (the plugin siteorigin) and everything was perfect.
Now, I create my own css file on my plugin (interface.css) and want to use it all, without having to be adding “! Important”. I added this code below to deregister the style function “so-panels-admin”.
function my_deregister_styles() { wp_deregister_style( 'so-panels-admin' ); // deregister as many stylesheets as you need... }
However, it is not working. How can I undo your file “css/admin.css” and replace with “myplugin/css/interface.css” in my plugin?
Hi Lucas
I’m very interested to see what plugin you’re developing here. Are they improvements we could incorporate into Page Builder in general?
I’m not exactly sure how to do this, but I think you might need to use wp_dequeue_style style instead.
https://codex.wordpress.org/Function_Reference/wp_dequeue_style
Also, make sure that you hook your function to admin_enqueue_scripts with a priority lower than 10. So maybe 15, to ensure it runs after Page Builder’s enqueues.
https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts
All that said, it’s generally a much better idea for compatibility to just ensure your style works in conjunction with the default Page Builder scripts.
This is a private message.
Tell me what you think of the idea.
Greg Friday, I’ve tried everything and I’m not getting.
I do not know if the code for your plugin is forcing to take priority …
MY PLUGIN:
I’ve tried all priorities.
YOUR PLUGIN IN: siteorigin-panels.php
Nothing happens. Help me please. I just need it to launch the plugin.
That’s a very cool looking design :)
I an see just one problem with your code. You just need to add in the action for the one add_action call.
Please let me know if that does the trick.
Greg, I changed, but not yet worked.
I suspect it is a matter of “priorities”. If I could at least leave my CSS to be the last one loaded, already solve my problem. For as the “so-panels-admin” can not disable it.
I looked for information on the internet, and I dedicated myself more than 12 hours from yesterday to today (overnight and all morning). But nothing has been resolved.
Greg,
Remember my plug-in that gives a new look to your PageBuilder SiteOrigin? Well. I got that scheme on “dequeue” and I’m ending it. Will soon be available in the repository.
Thank you for your support.
I’m excited to see it! Are you submitting it to the WordPress.org directory?