WordPress.org

Ready to get started?Download WordPress

Forums

Genesis Simple Breadcrumbs
CSS conflict with other plugins (3 posts)

  1. Marco Chiesi
    Member
    Posted 1 year ago #

    Hello,
    thanks for this useful plugin. However I noticed that the admin css of the plugin is loaded on every admin page, not just the plugin's own settings page, and this causes CSS conflicts with other plugins in the admin. Would it be possible to load it conditionally only in the plugin settings page? I was able to workaround this problem using custom code and hooks, but it would be nice if the behavior was native.
    By the way, I'd suggest you to insert CSS/JS using the admin_enqueue_scripts hook (see Codex documentation and examples) instead of admin_head.

    http://wordpress.org/extend/plugins/genesis-simple-breadcrumbs/

  2. wipeoutmedia
    Member
    Posted 1 year ago #

    Hi Nick,

    I would like to know if there will be an update for this plugin in the near future as we have been alerted that this issue is affecting our CSS & JavaScript Toolbox plugin.

    Thanks,
    Damian

  3. Marco Chiesi
    Member
    Posted 1 year ago #

    By the way, if anyone is interested on my fix, here's the snippet I used to fix it (to be added in theme's functions.php or in a custom plugin):

    add_action('admin_init', 'fix_gsb_css');
    function fix_gsb_css() {
    	global $pagenow;
    	if($pagenow != "admin.php" || !isset($_GET['page']) || $_GET['page'] != "gsb-settings") {
    		remove_action( 'admin_head', 'ntg_styles_inline' );
    	}
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.