WordPress.org

Ready to get started?Download WordPress

Forums

Group Documents
CSS config (4 posts)

  1. groomedmonkey
    Member
    Posted 3 years ago #

    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.

  2. Peter Anselmo
    Member
    Plugin Author

    Posted 3 years ago #

    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

  3. groomedmonkey
    Member
    Posted 3 years ago #

    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.

  4. Peter Anselmo
    Member
    Plugin Author

    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic