WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Group Documents] CSS config

[Plugin: Group Documents] CSS config

  • I would like to alter the spacing of the input fields and minimise the amount of linked files in my <head>. Obviously changing the css in the plugin directory will get overwritten upon update and I can easily override styles in my main css file.

    What this leads to is a suggestion for a feature to turn off the plugin linked css so that it doesn’t add a link in the <head>. Then one could copy all the required styles to the theme’s main css to customise. I think more advanced users, including myself, would appreciate this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Peter Anselmo

    @peter-anselmo

    Hi,
    I used wp_enqueue_style() to link all of the CSS pages. Thus, you can use wp_deregister_style() to safely unlink the css pages without altering the core plugin. You’ll want to look in include/cssjs.php for more information about where the scripts are called and what action they are tied to.

    It will be something along the lines of wp_deregister_style(‘bp-group-documents’). Please note, I have not tested that, and you may need to tweak it.

    Cheers,
    Peter

    Thanks for the response Peter. I’ll look into it when I get time, it would be perfect if that works. I assume it goes in my functions.php.

    Plugin Author Peter Anselmo

    @peter-anselmo

    Hi,
    Yup Yup, functions.php is where to put it. Now that I think about it, it may also have to go inside an action hook. So it would look like:

    function mytheme_remove_styles() {
    wp_deregister_style(‘bp-group-documents’);
    }
    add_action(‘template_redirect’,’mytheme_remove_styles’,10);

    Once again, I havn’t tested that, so it may need tweaking.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Group Documents] CSS config’ is closed to new replies.